diff --git a/capi/__init__.py b/capi/__init__.py index 9c6bbb6..3650a99 100644 --- a/capi/__init__.py +++ b/capi/__init__.py @@ -163,7 +163,15 @@ class CAPIAuthorizer: except Exception as e: # probably here something don't work - logger.warning(f'Fail on refreshing token for {state!r}, row:{row}', exc_info=e) + text = '' + try: + text = refresh_request.text + + except Exception as e1: + text = f"can't get text because {e1}" + + logger.warning( + f'Fail on refreshing token for {state!r}, row:{row!r}, text: {text}', exc_info=e) msg['status'] = 'error' self.model.increment_refresh_tries(state)