Merge "Adds missing error msg for HTTPNotFound exception"
This commit is contained in:
commit
8f015752a2
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user