From 14c5271ecd79b6a45b9021a6934eabcbc1d84987 Mon Sep 17 00:00:00 2001 From: Roberto Cosenza Date: Thu, 8 Jul 2021 11:14:42 +0000 Subject: [PATCH] When the hub responds with an error, print the message the we sent so that we can debug more easily where the problem is. --- neohubapi/neohub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neohubapi/neohub.py b/neohubapi/neohub.py index fc28c70..ded2539 100644 --- a/neohubapi/neohub.py +++ b/neohubapi/neohub.py @@ -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}")