Skip to content

Commit

Permalink
Improve message decompress error (#1342)
Browse files Browse the repository at this point in the history
* Improve message decompress error

* Fix lint
  • Loading branch information
RobertIndie authored Mar 7, 2025
1 parent 6cb2867 commit 802aa69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pulsar/consumer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,12 @@ func (pc *partitionConsumer) Decompress(msgMeta *pb.MessageMetadata, payload int

uncompressed, err := provider.Decompress(nil, payload.ReadableSlice(), int(msgMeta.GetUncompressedSize()))
if err != nil {
return nil, err
return nil, fmt.Errorf("failed to decompress message: %w, compression type: %d, payload size: %d, "+
"uncompressed size: %d",
err,
msgMeta.GetCompression(),
len(payload.ReadableSlice()),
msgMeta.GetUncompressedSize())
}

return internal.NewBufferWrapper(uncompressed), nil
Expand Down

0 comments on commit 802aa69

Please sign in to comment.