From cafbcb507d2e4dc6fecb811bc29ba840b76cb4ec Mon Sep 17 00:00:00 2001 From: Lukas Cerny Date: Wed, 31 Oct 2018 08:25:38 +0000 Subject: [PATCH] Bug fix: Catch all exceptions on incorrect response. --- exponea_python_sdk/client.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exponea_python_sdk/client.py b/exponea_python_sdk/client.py index 84484ac..07fadce 100644 --- a/exponea_python_sdk/client.py +++ b/exponea_python_sdk/client.py @@ -47,7 +47,7 @@ def request(self, method, path, payload=None): self.logger.debug('Response status code: %d', status) try: result = json.loads(response.text) - except JSONDecodeError: + except Exception: self.logger.error(response.text) raise APIException(response.text) if status == 200 and result['success']: diff --git a/setup.py b/setup.py index 255a7d4..a6cc03b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='exponea-python-sdk', - version='0.1.7', + version='0.1.8', author='Lukas Cerny', author_email='lukas.cerny@exponea.com', description='A Python client for Exponea Data API',