Skip to content

Commit 5a16ac7

Browse files
Fix crashing on decompression error (#28140)
1 parent 1d6ed37 commit 5a16ac7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ydb/core/viewer/viewer_topic_data.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ void TTopicData::FillProtoResponse(ui64 maxTotalSize) {
201201
if (codec == nullptr) {
202202
return ReplyAndPassAway(GetHTTPINTERNALERROR("text/plain", "Message decompression failed"));
203203
}
204-
setData(*messageProto, std::move(codec->Decompress(dataChunk.GetData())));
204+
try {
205+
setData(*messageProto, std::move(codec->Decompress(dataChunk.GetData())));
206+
} catch (const std::exception& e) {
207+
setData(*messageProto, ">>> Message decompression failed <<<");
208+
}
205209
} else {
206210
setData(*messageProto, std::move(*dataChunk.MutableData()));
207211
}

0 commit comments

Comments
 (0)