Don't drop details info in the raised exception
In previous code, the 'details' key in error response body is missed in the raised exceptions. This patch will reserve it. Change-Id: Idb10c05135d2cbf5a90adbaa812abfb9ef0d153d
This commit is contained in:
parent
4c6d36cfaa
commit
6e21892a0b
|
@ -47,7 +47,10 @@ def get_http_error_details(response):
|
|||
for error in msg.get('related_errors', []) if
|
||||
error.get('httpStatus')]
|
||||
|
||||
details = msg.get('details')
|
||||
msg = msg['error_message']
|
||||
if details:
|
||||
msg += " details: %s" % details
|
||||
if related_errors:
|
||||
msg += " relatedErrors: %s" % ' '.join(related_errors)
|
||||
|
||||
|
|
Loading…
Reference in New Issue