Update quota-class-set and quota-set thrown 500 error

Bug #1249222 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
huangtianhua

Bug Description

When update quota-class-set without the parameter "quota_class_set",the server throws a 500 error:
 "The server has either erred or is incapable of performing the requested operation."

Because the server doesn't check whether the parameter "quota_class_set" is in request body,the KeyError is not catched.

   for key in body['quota_class_set'].keys():
       ......

I think we should catch the KeyError and transfer the KeyError to 400(HTTPBadRequest) instead of 500.
Update quota-set has the same problem.

Changed in nova:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/55633
Committed: http://github.com/openstack/nova/commit/cf6bf1c88687da5c18487ddfa2434a3943129847
Submitter: Jenkins
Branch: master

commit cf6bf1c88687da5c18487ddfa2434a3943129847
Author: huangtianhua <email address hidden>
Date: Fri Nov 8 16:05:17 2013 +0800

    Update quota-class-set/quota-set throw 500 error

    The server doesn't check whether the parameter "quota_class_set" is in request
    body.So the 500 error has been thrown.

    We should catch the KeyError and transfer the KeyError to
    400(HTTPBadRequest) instead of 500.

    Change-Id: I431a836bd35f846790497d6179515e8d559e2cd0
    Closes-Bug: #1249222

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.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.