Fix TypeError if error description is None (#96)
diff --git a/google/oauth2/_client.py b/google/oauth2/_client.py
index 1b26549..468cb7e 100644
--- a/google/oauth2/_client.py
+++ b/google/oauth2/_client.py
@@ -48,9 +48,9 @@
"""
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