Skip to content

Commit

Permalink
Decode bytes prior to log msg
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jun 26, 2022
1 parent af205c0 commit cc18c84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tractor/_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,11 @@ async def _iter_packets(self) -> AsyncGenerator[dict, None]:
# 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:
Expand Down

0 comments on commit cc18c84

Please sign in to comment.