Merge "Fix failing to parse json error msg"

This commit is contained in:
Zuul
2021-04-01 10:03:54 +00:00
committed by Gerrit Code Review

View File

@@ -69,6 +69,9 @@ def _extract_error_json(body, resp):
try:
body_json = resp.json()
return _extract_error_json_text(body_json)
except AttributeError:
body_json = jsonutils.loads(body)
return _extract_error_json_text(body_json)
except ValueError:
return {}
else: