Merge "Adds missing error msg for HTTPNotFound exception"

This commit is contained in:
Jenkins 2013-07-14 13:26:31 +00:00 committed by Gerrit Code Review
commit 8f015752a2
2 changed files with 5 additions and 5 deletions

View File

@ -178,7 +178,7 @@ class ImagesController(object):
except exception.NotFound as e:
msg = ("Failed to find image %(image_id)s to delete" % locals())
LOG.info(msg)
raise webob.exc.HTTPNotFound()
raise webob.exc.HTTPNotFound(explanation=msg)
def _get_locations_op_pos(self, path_pos, max_pos, allow_max):
if path_pos is None or max_pos is None:

View File

@ -46,7 +46,7 @@ class Controller(object):
except exception.NotFound:
msg = _("Image %(id)s not found")
LOG.info(msg % {'id': image_id})
raise webob.exc.HTTPNotFound()
raise webob.exc.HTTPNotFound(msg)
except exception.Forbidden:
# If it's private and doesn't belong to them, don't let on
# that it exists
@ -80,7 +80,7 @@ class Controller(object):
except exception.NotFound:
msg = _("Image %(id)s not found")
LOG.info(msg % {'id': image_id})
raise webob.exc.HTTPNotFound()
raise webob.exc.HTTPNotFound(msg)
except exception.Forbidden:
# If it's private and doesn't belong to them, don't let on
# that it exists
@ -193,7 +193,7 @@ class Controller(object):
except exception.NotFound:
msg = _("Image %(id)s not found")
LOG.info(msg % {'id': image_id})
raise webob.exc.HTTPNotFound()
raise webob.exc.HTTPNotFound(msg)
except exception.Forbidden:
# If it's private and doesn't belong to them, don't let on
# that it exists
@ -253,7 +253,7 @@ class Controller(object):
except exception.NotFound:
msg = _("Image %(id)s not found")
LOG.info(msg % {'id': image_id})
raise webob.exc.HTTPNotFound()
raise webob.exc.HTTPNotFound(msg)
except exception.Forbidden:
# If it's private and doesn't belong to them, don't let on
# that it exists