More verbose on refresh fail

This commit is contained in:
norohind 2021-12-17 00:44:33 +03:00
parent 1bd72764b8
commit bc2e13786f
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -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)