Inconsistent HTTP error code for validation

Bug #1046956 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Nachi Ueno

Bug Description

IP address or Mac validation failures return 422
Otherwise quantum returns 400.

This is not consistent.
We should have consistent error code handling.

Revision history for this message
dan wendlandt (danwent) wrote :

I thought we had found and removed all 422's a long time ago, but looks like some remain from the original v2 implementation. I think it makes sense to remove these. Seems low risk.

Changed in quantum:
importance: Undecided → Medium
assignee: nobody → Nachi Ueno (nati-ueno)
milestone: none → folsom-rc1
status: New → Confirmed
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I think there are 422 thrown also in other cases (for instance if you do a PUT on a post-only attribute).

Please keep in mind that if this will not land in Folsom, changing it in Grizzly will produce a non compatible API change, so it is "relatively" low risk.

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

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

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

Reviewed: https://review.openstack.org/12666
Committed: http://github.com/openstack/quantum/commit/255552cb7bf4dd5849791a7c88cda709f6ce829d
Submitter: Jenkins
Branch: master

commit 255552cb7bf4dd5849791a7c88cda709f6ce829d
Author: Nachi Ueno <email address hidden>
Date: Sun Sep 9 04:58:07 2012 +0000

    Change 422 error to 400 error

    Fixes bug 1046956
    For error code consistency, change 422 error to 400 error

    Change-Id: I1d150c883e204af8a32de61f91392a46d8397ae1

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-rc1 → 2012.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.