Include error_description from code exchange failures.
This commit is contained in:
@@ -1864,7 +1864,7 @@ class OAuth2WebServerFlow(Flow):
|
||||
logger.info('Failed to retrieve access token: %s', content)
|
||||
if 'error' in d:
|
||||
# you never know what those providers got to say
|
||||
error_msg = str(d['error'])
|
||||
error_msg = str(d['error']) + str(d.get('error_description', ''))
|
||||
else:
|
||||
error_msg = 'Invalid response: %s.' % str(resp.status)
|
||||
raise FlowExchangeError(error_msg)
|
||||
|
||||
Reference in New Issue
Block a user