diff options
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/images.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py index 82db21c9e..3d54da0b5 100644 --- a/nova/api/openstack/compute/images.py +++ b/nova/api/openstack/compute/images.py @@ -159,6 +159,11 @@ class Controller(wsgi.Controller): except exception.ImageNotFound: explanation = _("Image not found.") raise webob.exc.HTTPNotFound(explanation=explanation) + except exception.ImageNotAuthorized: + # The image service raises this exception on delete if glanceclient + # raises HTTPForbidden. + explanation = _("You are not allowed to delete the image.") + raise webob.exc.HTTPForbidden(explanation=explanation) return webob.exc.HTTPNoContent() @wsgi.serializers(xml=MinimalImagesTemplate) |
