ventilaar
/
clim
Archived
1
Fork 0

be more verbose

This commit is contained in:
Ventilaar 2022-04-02 22:56:07 +02:00
parent 9a50318740
commit 85ea999996
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class GoogleOID:
r = self.requests.post('https://oauth2.googleapis.com/token', data=data) # exchange code for token
if r.status_code != 200: # if not successful
return {'error': True, 'reason': f'Could not exchange code for access key'}
return {'error': True, 'reason': f'Could not exchange code for access key {r.status_code}'}
return {'error': False, 'data': r.json()}
@ -40,7 +40,7 @@ class GoogleOID:
r = self.requests.get('https://openidconnect.googleapis.com/v1/userinfo', headers=headers)
if r.status_code != 200: # if not successful
return {'error': True, 'reason': 'Could not get profile info'}
return {'error': True, 'reason': f'Could not get profile info {r.status_code}'}
return {'error': False, 'profile': r.json()}