From 3d39ac39b26d7dbe598c245bef4df22adb52882c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Kub=C3=AD=C4=8Dek?= Date: Tue, 4 Mar 2025 13:47:07 +0100 Subject: [PATCH] superfaktura_api: preserve the exception context --- superfaktura/superfaktura_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superfaktura/superfaktura_api.py b/superfaktura/superfaktura_api.py index 9e6e559..9f53bb2 100644 --- a/superfaktura/superfaktura_api.py +++ b/superfaktura/superfaktura_api.py @@ -92,7 +92,7 @@ class SuperFakturaAPI: except requests.exceptions.JSONDecodeError as e: raise SuperFakturaAPIException( f"Unable to decode response as JSON; {req.content!r}; {e}" - ) + ) from e raise SuperFakturaAPIException( f"Get status code: {req.status_code}; {req.content!r}" )