From 8b31e2bc4843f76b659a644406c0a522bf29b612 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Tue, 14 Nov 2017 23:24:55 +0000 Subject: [PATCH] Show detailed message of neutron exception This patch improves the error message by retrieving the more details from the exception instance. Otherwise, the real error message won't be displayed (unless using --debug in the command). Change-Id: I8ba694bda86f7cc8362e301b2044d9b610dde49c --- openstackclient/network/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstackclient/network/common.py b/openstackclient/network/common.py index a2e700be2f..eca0de3c9a 100644 --- a/openstackclient/network/common.py +++ b/openstackclient/network/common.py @@ -191,6 +191,8 @@ class NetworkAndComputeShowOne(command.ShowOne): self.app.client_manager.compute, parsed_args) except openstack.exceptions.HttpException as exc: msg = _("Error while executing command: %s") % exc.message + if exc.details: + msg += ", " + six.text_type(exc.details) raise exceptions.CommandError(msg) def get_parser(self, prog_name):