diff --git a/nova/api/openstack/compute/consoles.py b/nova/api/openstack/compute/consoles.py index 40b4aceabe24..1d1fc7232fce 100644 --- a/nova/api/openstack/compute/consoles.py +++ b/nova/api/openstack/compute/consoles.py @@ -107,8 +107,8 @@ class Controller(object): req.environ['nova.context'], server_id, int(id)) - except exception.NotFound: - raise exc.HTTPNotFound() + except exception.NotFound as e: + raise exc.HTTPNotFound(explanation=e.format_message()) return _translate_detail_keys(console) def delete(self, req, server_id, id): @@ -117,8 +117,8 @@ class Controller(object): self.console_api.delete_console(req.environ['nova.context'], server_id, int(id)) - except exception.NotFound: - raise exc.HTTPNotFound() + except exception.NotFound as e: + raise exc.HTTPNotFound(explanation=e.format_message()) return webob.Response(status_int=202)