From bb6b6343b0905eacda5d7bc5decad318d74e4283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Kub=C3=AD=C4=8Dek?= Date: Tue, 4 Mar 2025 13:10:34 +0100 Subject: [PATCH] superfaktura_api: fix return values of get method --- superfaktura/superfaktura_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/superfaktura/superfaktura_api.py b/superfaktura/superfaktura_api.py index a384674..65880d5 100644 --- a/superfaktura/superfaktura_api.py +++ b/superfaktura/superfaktura_api.py @@ -91,8 +91,11 @@ class SuperFakturaAPI: return req.json() except requests.exceptions.JSONDecodeError as e: raise SuperFakturaAPIException( - f"Get status code: {req.status_code}; {req.content}; {e}" + f"Unable to decode response as JSON; {req.content!r}; {e}" ) + raise SuperFakturaAPIException( + f"Get status code: {req.status_code}; {req.content!r}" + ) def post(self, endpoint: str, data: str, timeout: int = 5) -> Dict: """