From cb3d5205279b3c61e72e21bb490a3f01062f0835 Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Fri, 14 Nov 2014 09:11:01 -0800 Subject: [PATCH] Include error_description from code exchange failures. --- oauth2client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2client/client.py b/oauth2client/client.py index 882bde1..84349cb 100644 --- a/oauth2client/client.py +++ b/oauth2client/client.py @@ -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)