Error message not passed to exception

Bug #1199373 reported by Rohit Karajgi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Aswad Rangnekar

Bug Description

In the v2 API 'delete/ method, https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L168,
the error explanation message was not passed to the HTTP exception being raised.

"except exception.NotFound as e:
            msg = ("Failed to find image %(image_id)s to delete" % locals())
            LOG.info(msg)
            raise webob.exc.HTTPNotFound() # this should be webob.exc.HTTPNotFound(explanation=msg)
"

Rohit Karajgi (rohitk)
Changed in glance:
assignee: nobody → Rohit Karajgi (rohitkarajgi)
Changed in glance:
assignee: Rohit Karajgi (rohitkarajgi) → Aswad Rangnekar (aswad-r)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/36809

Changed in glance:
status: New → In Progress
Revision history for this message
Aswad Rangnekar (aswad-r) wrote :

Found some more similar occurrences across code (fixed in the patch):

glance/registry/api/v1/members.py:49: raise webob.exc.HTTPNotFound(msg)
glance/registry/api/v1/members.py:83: raise webob.exc.HTTPNotFound(msg)
glance/registry/api/v1/members.py:196: raise webob.exc.HTTPNotFound(msg)
glance/registry/api/v1/members.py:256: raise webob.exc.HTTPNotFound(msg)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/36809
Committed: http://github.com/openstack/glance/commit/5884ca4825e0674d10f7c19ca5ddd353a31efe6d
Submitter: Jenkins
Branch: master

commit 5884ca4825e0674d10f7c19ca5ddd353a31efe6d
Author: Aswad Rangnekar <email address hidden>
Date: Thu Jul 11 08:30:49 2013 -0700

    Adds missing error msg for HTTPNotFound exception

    Fixes bug 1199373

    Change-Id: Ie1e554bd192c90de420672e4b87c489b8ffffc85

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.