From f134266efcfca31501e99d36dc18b6dc3cd8c0b4 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 1 Mar 2021 10:48:12 +0100 Subject: [PATCH] Improve logging for websocket JSON loads --- resources/lib/websocket_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index b0468617..f50bbbd0 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -177,9 +177,9 @@ class PMS_Websocket(WebSocket): try: message = loads(message) - except ValueError: - LOG.error('%s: Error decoding message from websocket', - self.__class__.__name__) + except ValueError as err: + LOG.error('%s: Error decoding message from websocket: %s', + self.__class__.__name__, err) LOG.error(message) return try: