Decode bytes prior to log msg

310_plus
Tyler Goodlet 2022-06-26 16:23:38 -04:00
parent af205c08f2
commit cc18c84389
1 changed files with 2 additions and 1 deletions

View File

@ -272,10 +272,11 @@ class MsgspecTCPStream(MsgpackTCPStream):
# ignore decoding errors for now and assume they have to
# do with a channel drop - hope that receiving from the
# channel will raise an expected error and bubble up.
decoded_bytes = msg_bytes.decode()
log.error(
'`msgspec` failed to decode!?\n'
'dumping bytes:\n'
f'{msg_bytes}'
f'{decoded_bytes}'
)
decodes_failed += 1
else: