Commit 697c2963 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[fix] Add actual error message from OS to log

The openstack client libraries bury the actual error message reported by
the openstack servers inside a Requests.Response object. This patch
makes sure we retrieve this message, as it is more useful than the top
level one.
parent 2b4de8c8
......@@ -63,7 +63,8 @@ def do_create(argv):
resp =**args)
print(json.dumps(resp, indent=4))
except keystoneauth1.exceptions.http.InternalServerError as e:
error_message = json.loads(e.response.text)['error_message']
print("error:", error_message)
def do_delete(argv):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment