Skip to content
Permalink
Browse files

Look for field 'detail' in error message. (#739)

  • Loading branch information...
busunkim96 committed Aug 13, 2019
1 parent bce1b1d commit 778eabe8a8caabb25a5024a9cbbb61160a3f340d
Showing with 2 additions and 0 deletions.
  1. +2 −0 googleapiclient/errors.py
@@ -52,6 +52,8 @@ def _get_reason(self):
reason = data['error']['message']
if 'details' in data['error']:
self.error_details = data['error']['details']
elif 'detail' in data['error']:
self.error_details = data['error']['detail']
elif isinstance(data, list) and len(data) > 0:
first_error = data[0]
reason = first_error['error']['message']

0 comments on commit 778eabe

Please sign in to comment.
You can’t perform that action at this time.