From 8db1db19c3b3e07cf66fdaad8d8d19b8def021f3 Mon Sep 17 00:00:00 2001 From: Danylo Date: Wed, 15 Mar 2023 12:15:32 +0200 Subject: [PATCH] added logs for invalid token --- panoply/constants.py | 2 +- panoply/datasource.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/panoply/constants.py b/panoply/constants.py index 89e1072..27f5e63 100644 --- a/panoply/constants.py +++ b/panoply/constants.py @@ -1,2 +1,2 @@ -__version__ = "2.1.0" +__version__ = "2.1.1" __package_name__ = "panoply-python-sdk" diff --git a/panoply/datasource.py b/panoply/datasource.py index 7c6bab4..5dfad6a 100644 --- a/panoply/datasource.py +++ b/panoply/datasource.py @@ -139,6 +139,9 @@ def wrapper(*args, **kwargs): _callback = getattr(self, callback) _callback(self.source.get(access_key)) except Exception as e: + response = getattr(e, 'response', None) + if isinstance(response, requests.Response): + self.log(response.text) self.log('Error: Access token can\'t be revalidated. ' 'The user would have to re-authenticate', traceback.format_exc())