diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/servers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py index cec7cbd60..41c3b92a5 100644 --- a/nova/api/openstack/compute/servers.py +++ b/nova/api/openstack/compute/servers.py @@ -1094,6 +1094,17 @@ class Controller(wsgi.Controller): except exception.InstanceInvalidState as state_error: common.raise_http_conflict_for_instance_invalid_state(state_error, 'resize') + except exception.ImageNotAuthorized as image_error: + msg = _("You are not authorized to access the image " + "the instance was started with.") + raise exc.HTTPUnauthorized(explanation=msg) + except exception.ImageNotFound as image_error: + msg = _("Image that the instance was started " + "with could not be found.") + raise exc.HTTPBadRequest(explanation=msg) + except exception.Invalid: + msg = _("Invalid instance image.") + raise exc.HTTPBadRequest(explanation=msg) return webob.Response(status_int=202) |
