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:
Qian Sun 2021-09-24 04:37:24 +00:00
parent 4c6d36cfaa
commit 6e21892a0b
1 changed files with 3 additions and 0 deletions

View File

@ -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)