Catch attrbute error for other APIs
Depending on the failure, ironic can return what gets translated to unicode, which can generate an AttributeError when the exception attempts to be examined to report the error, which suppresses the original error. Added AttributeError to the exception catch. Change-Id: I246c2e797a7ed22f990a264856c7cbda18be7ca5
This commit is contained in:
parent
f1cd4019cd
commit
3cf201fb6a
|
@ -148,6 +148,9 @@ def raise_from_response(response, error_message=None):
|
|||
except ValueError:
|
||||
if response.reason:
|
||||
remote_error += " {reason}".format(reason=response.reason)
|
||||
except AttributeError:
|
||||
if response.reason:
|
||||
remote_error += " {reason}".format(reason=response.reason)
|
||||
|
||||
_log_response_extras(response)
|
||||
|
||||
|
|
Loading…
Reference in New Issue