Added error description to AccessTokenRefreshError
The JSON response returned can contain an "error_description" field that contains additional information about the error. If found, appending to the error message.
This commit is contained in:
@@ -760,6 +760,8 @@ class OAuth2Credentials(Credentials):
|
|||||||
d = json.loads(content)
|
d = json.loads(content)
|
||||||
if 'error' in d:
|
if 'error' in d:
|
||||||
error_msg = d['error']
|
error_msg = d['error']
|
||||||
|
if 'error_description' in d:
|
||||||
|
error_msg += ': ' + d['error_description']
|
||||||
self.invalid = True
|
self.invalid = True
|
||||||
if self.store:
|
if self.store:
|
||||||
self.store.locked_put(self)
|
self.store.locked_put(self)
|
||||||
|
|||||||
Reference in New Issue
Block a user