When the hub responds with an error, print the message the we sent so that we can debug more easily where the problem is.

This commit is contained in:
Roberto Cosenza 2021-07-08 11:14:42 +00:00 committed by Andrius Štikonas
parent d811131f8a
commit 14c5271ecd
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class NeoHub:
return reply
if reply.__dict__ == expected_reply:
return True
self._logger.error(f"[{attempt}] Unexpected reply: {reply}")
self._logger.error(f"[{attempt}] Unexpected reply: {reply} for message: {message}")
except (socket.gaierror, ConnectionRefusedError) as e:
last_exception = NeoHubConnectionError(e)
self._logger.error(f"[{attempt}] Could not connect to NeoHub at {self._host}: {e}")