Shows reason of failure in base.get

base.get showed only a generic message, hiding the real problem
that happened.

Change-Id: I44b60f8e5bfb059a426def6e89502d7fb02bae6f
Closes-Bug: #1498105
This commit is contained in:
henriquetruta
2015-09-21 14:56:40 -03:00
parent d7dae5eb95
commit 846ade2c49

View File

@@ -174,10 +174,10 @@ class ResourceManager(object):
try:
error_data = get_json(resp)
except Exception:
msg = _("Failed to parse response from Sahara: %s") % resp.reason
raise APIException(
error_code=resp.status_code,
error_message=_("Failed to parse response from Sahara. Check "
"if service catalog configured properly."))
error_message=msg)
raise APIException(error_code=error_data.get("error_code"),
error_name=error_data.get("error_name"),