From f0523fc3707ff3c6aaf9a1bf8038106fccd9d5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20JUMELLE?= Date: Fri, 8 Nov 2024 22:35:54 +0100 Subject: [PATCH] Better exception catch in case of API returning wrong data --- plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.py b/plugin.py index 431802d..f3e0f7c 100644 --- a/plugin.py +++ b/plugin.py @@ -144,6 +144,8 @@ class BasePlugin(object): else: Domoticz.Error(f"HTTP Error: {response.status_code}") except requests.exceptions.RetryError as exc: + Domoticz.Error("HTTP Error - " + str(exc)) + except Exception as exc: Domoticz.Error(str(exc)) self._pooling_current_step = 1