Glance API returns a 500 response code for invalid request params

Bug #919244 reported by Unmesh Gurjar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Kevin L. Mitchell

Bug Description

When the Glance API for replace image members is provided with an invalid request body, it returns an Internal Server Error(500).
The API should return a Bad Request(400) response instead.

Here is the sample Json request body:
{"test": [ {"member_id": "demo", "can_share": false}]}

Jay Pipes (jaypipes)
tags: added: verification-needed
Changed in glance:
assignee: nobody → Kevin L. Mitchell (klmitch)
milestone: none → essex-3
importance: Undecided → Medium
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/3228

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/3228
Committed: http://github.com/openstack/glance/commit/eb2ab3a40a7ddc6038a254c27870f92cfd012d24
Submitter: Jenkins
Branch: master

commit eb2ab3a40a7ddc6038a254c27870f92cfd012d24
Author: Kevin L. Mitchell <email address hidden>
Date: Fri Jan 20 13:31:47 2012 -0600

    Return 400 if registry returns 400.

    Fixes bug 919244. The registry would return 400 for invalid input,
    which resulted in an exception.Invalid being thrown in the registry
    client. There was no exception handler for this exception, so it
    got bubbled up and turned into a 500. This should fix the problem
    by adding the missing exception handlers.

    Change-Id: I75ecfec1c0b0b4b3df1a8c9ace83e75d19527c93

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-3 → 2012.1
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.