From aba1ddd3df4d03ad2e29a23882f018be5f47089f Mon Sep 17 00:00:00 2001 From: "Jokob @NetAlertX" <96159884+jokob-sk@users.noreply.github.com> Date: Sun, 8 Mar 2026 07:57:52 +0000 Subject: [PATCH] Handle JSON decoding errors in _get_data function --- test/plugins/test_sync_protocol.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/plugins/test_sync_protocol.py b/test/plugins/test_sync_protocol.py index 75a283ad..9d46cf26 100644 --- a/test/plugins/test_sync_protocol.py +++ b/test/plugins/test_sync_protocol.py @@ -58,7 +58,10 @@ def _get_data(api_token, node_url): try: response = requests.get(node_url + API_ENDPOINT, headers=headers, timeout=5) if response.status_code == 200: - return response.json() + try: + return response.json() + except json.JSONDecodeError: + pass except requests.RequestException: pass return ""