be more verbose
This commit is contained in:
parent
9a50318740
commit
85ea999996
|
@ -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()}
|
||||
|
||||
|
|
Reference in New Issue