Change 404 to 400 when resource not found exception raises

Bug #1494122 reported by bharaththiruveedula
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
space

Bug Description

Actually HTTP code 404 is for URL not found kind of issues. But in magnum we are sending 404 for resource not found kind of issues. And we have pactch for this guideline in openstack https://review.openstack.org/#/c/221163 which is in progress now. Once this patch is merged, we have to modify 404 to 400 for ResourceNotFound Exceptions and appropriately change the test cases too.

summary: - Change 404 to 400 when reosurce not found exception raises
+ Change 404 to 400 when resource not found exception raises
Changed in magnum:
assignee: nobody → bharaththiruveedula (bharath-ves)
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
description: updated
space (fengzhr)
Changed in magnum:
assignee: bharaththiruveedula (bharath-ves) → space (fengzhr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by fengzhr (<email address hidden>) on branch: master
Review: https://review.openstack.org/267386

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

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

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

Reviewed: https://review.openstack.org/267902
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=93d9f0fe9f211ab8a63645ceca0fe4b9687929ed
Submitter: Jenkins
Branch: master

commit 93d9f0fe9f211ab8a63645ceca0fe4b9687929ed
Author: space <email address hidden>
Date: Fri Jan 15 10:51:51 2016 +0800

    Change 404 to 400 when resource not found exception raises

    According to the new document and Hong Bin's opinion,I changed
    code 404 to 400 of the classes as follows:
    ImageNotFound
    OSDistroFieldNotFound
    FlavorNotFound
    NetworkNotFound,
    because they are nonexistent resources.

    So these four exceptions will report code 400 in the future
    and we should pay attention to it.

    Change-Id: I4040340f9605e3ed03af2ec3b965bf2fc54a0d98
    Closes-Bug: #1494122

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 2.0.0

This issue was fixed in the openstack/magnum 2.0.0 release.

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.