Skip to content

Commit 5dbd26c

Browse files
Fix crashing on decompression error (#28140)
1 parent 88f362b commit 5dbd26c

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
@@ -202,7 +202,11 @@ void TTopicData::FillProtoResponse(ui64 maxTotalSize) {
202202
if (codec == nullptr) {
203203
return ReplyAndPassAway(GetHTTPINTERNALERROR("text/plain", "Message decompression failed"));
204204
}
205-
setData(*messageProto, std::move(codec->Decompress(dataChunk.GetData())));
205+
try {
206+
setData(*messageProto, std::move(codec->Decompress(dataChunk.GetData())));
207+
} catch (const std::exception& e) {
208+
setData(*messageProto, ">>> Message decompression failed <<<");
209+
}
206210
} else {
207211
setData(*messageProto, std::move(*dataChunk.MutableData()));
208212
}

0 commit comments

Comments
 (0)