Fix KeyError when error_body = body_json['errors'][0]
Change-Id: I33a855d173d31a78a8fda9ac8b1c753b71158298 Closes-Bug: #1810908
This commit is contained in:
parent
eedf5c7fdd
commit
b328c351ba
@ -51,7 +51,7 @@ def _extract_error_json(body):
|
||||
error_body = body_json['error']
|
||||
error_json = {'faultstring': error_body['title'],
|
||||
'debuginfo': error_body['message']}
|
||||
else:
|
||||
elif 'errors' in body_json:
|
||||
error_body = body_json['errors'][0]
|
||||
error_json = {'faultstring': error_body['title']}
|
||||
if 'detail' in error_body:
|
||||
|
Loading…
x
Reference in New Issue
Block a user