diff --git a/google/oauth2/_client.py b/google/oauth2/_client.py index 1b26549b7..468cb7e88 100644 --- a/google/oauth2/_client.py +++ b/google/oauth2/_client.py @@ -48,9 +48,9 @@ def _handle_error_response(response_body): """ try: error_data = json.loads(response_body) - error_details = ': '.join([ + error_details = '{}: {}'.format( error_data['error'], - error_data.get('error_description')]) + error_data.get('error_description')) # If no details could be extracted, use the response data. except (KeyError, ValueError): error_details = response_body