Glance API returns a 500 response code for invalid request params

Bug #919244 reported by Unmesh Gurjar on 2012-01-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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) on 2012-01-20
tags: added: verification-needed
Changed in glance:
assignee: nobody → Kevin L. Mitchell (klmitch)
milestone: none → essex-3
importance: Undecided → Medium

Fix proposed to branch: master

Changed in glance:
status: New → In Progress

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) on 2012-01-25
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in glance:
milestone: essex-3 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers