Skip to content

Commit 8b31e2b

Browse files
author
Hongbin Lu
committed
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
1 parent 4742d4d commit 8b31e2b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

openstackclient/network/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def take_action(self, parsed_args):
191191
self.app.client_manager.compute, parsed_args)
192192
except openstack.exceptions.HttpException as exc:
193193
msg = _("Error while executing command: %s") % exc.message
194+
if exc.details:
195+
msg += ", " + six.text_type(exc.details)
194196
raise exceptions.CommandError(msg)
195197

196198
def get_parser(self, prog_name):

0 commit comments

Comments
 (0)