app: try better error in app

This commit is contained in:
Swapnil 2024-01-30 21:00:30 +05:30
parent cce57bca72
commit bf8b33edde
Signed by: swapnil
GPG Key ID: 58029C48BB100574
1 changed files with 3 additions and 1 deletions

View File

@ -169,7 +169,9 @@ def save_token(email, access_token, refresh_token, expiration_seconds):
'expiration_seconds': expiration_seconds
}
)
response.raise_for_status()
# response.raise_for_status()
if response.status_code not in range(200, 300):
raise Exception(f'HTTPError: {response.status_code} \n Message: {response.json()}')
return response.json().get('id')