From 846ade2c49e3523ea3d39dcd4550ddc789e80b01 Mon Sep 17 00:00:00 2001 From: henriquetruta Date: Mon, 21 Sep 2015 14:56:40 -0300 Subject: [PATCH] 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 --- saharaclient/api/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/saharaclient/api/base.py b/saharaclient/api/base.py index b26015a0..ab534cb1 100644 --- a/saharaclient/api/base.py +++ b/saharaclient/api/base.py @@ -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"),