Skip to content

Commit

Permalink
chore: improve p2p protocol error logging (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
glevco authored Nov 8, 2024
1 parent 6ad7089 commit 759c1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hathor/p2p/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def recv_message(self, cmd: ProtocolMessages, payload: str) -> None:
.addErrback(self._on_cmd_handler_error, cmd)

def _on_cmd_handler_error(self, failure: Failure, cmd: ProtocolMessages) -> None:
self.log.warn('recv_message processing error', reason=failure.getErrorMessage(), exc_info=True)
self.log.error(f'recv_message processing error:\n{failure.getTraceback()}', reason=failure.getErrorMessage())
self.send_error_and_close_connection(f'Error processing "{cmd.value}" command')

def send_error(self, msg: str) -> None:
Expand Down

0 comments on commit 759c1d7

Please sign in to comment.