aiokafka icon indicating copy to clipboard operation
aiokafka copied to clipboard

Better error message on unsupported compression type

Open beregon87 opened this issue 3 years ago • 0 comments

Currently, in aiokafka.record.default_records._DefaultRecordBatchPy._maybe_uncompress it doesn't handle any compression type that is not supported. So if, for example, a record is consumed that is compressed with zstd, you will only get following error message:

UnboundLocalError: local variable 'uncompressed' referenced before assignment

It would be good with a more informative error message here, informing the user than an unsupported compression type was used.

beregon87 avatar Dec 16 '20 10:12 beregon87