Quantum API returns 200 status code when wrong error of the API is specified on URI

Bug #934115 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Mark McClain
quantum (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Precise by Yolanda Robla

Bug Description

If a non-existent API version if specified, say X.Y, the Quantum API returns the "versions" screen with a 200 status code.
I'm not sure whether this is the intended behaviour; a 404 would sound more suitable for me.

Revision history for this message
Maru Newby (maru) wrote :

How do I reproduce this problem?

Changed in quantum:
assignee: nobody → Maru Newby (maru)
Revision history for this message
dan wendlandt (danwent) wrote : Re: [Bug 934115] Re: Quantum API returns 200 status code when wrong error of the API is specified on URI

all urls include a version, see:
http://docs.openstack.org/incubation/openstack-network/developer/quantum-api-1.0/content/Versions.html

my guess is that if you query a url with a bogus version, say 2.0, you get
an HTTP 200 back, whereas the bug says you should get a 404 back.

for example:

GET /v2.0/tenants/tenantX/networks

On Fri, Mar 2, 2012 at 4:03 PM, Maru Newby <email address hidden> wrote:

> How do I reproduce this problem?
>
> ** Changed in: quantum
> Assignee: (unassigned) => Maru Newby (maru)
>
> --
> You received this bug notification because you are a member of Netstack
> Core Developers, which is subscribed to quantum.
> https://bugs.launchpad.net/bugs/934115
>
> Title:
> Quantum API returns 200 status code when wrong error of the API is
> specified on URI
>
> Status in OpenStack Quantum (virtual network service):
> New
>
> Bug description:
> If a non-existent API version if specified, say X.Y, the Quantum API
> returns the "versions" screen with a 200 status code.
> I'm not sure whether this is the intended behaviour; a 404 would sound
> more suitable for me.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/934115/+subscriptions
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Maru Newby (maru)
tags: added: low-hanging-fruit
Changed in quantum:
assignee: Maru Newby (maru) → Mark McClain (markmcclain)
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/5378

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

Reviewed: https://review.openstack.org/5378
Committed: http://github.com/openstack/quantum/commit/102c917be984079e53e729cc50554c96ba24f248
Submitter: Jenkins
Branch: master

commit 102c917be984079e53e729cc50554c96ba24f248
Author: Mark McClain <email address hidden>
Date: Mon Apr 9 10:08:00 2012 -0400

    return 404 for invalid api version request

    fixes bug: 934115

    This fix returns 404 for all non-root requests that route via the
    versions app. For root requests ('/') the available api version info is
    returned.

    Change-Id: I701389d9239cb40426f7a47206642b56c7eeeae1

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
milestone: none → folsom-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (stable/essex)

Fix proposed to branch: stable/essex
Review: https://review.openstack.org/8648

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (stable/essex)

Reviewed: https://review.openstack.org/8648
Committed: http://github.com/openstack/quantum/commit/18c043c0ae73a915946a770eda2a4b88877b4ede
Submitter: Jenkins
Branch: stable/essex

commit 18c043c0ae73a915946a770eda2a4b88877b4ede
Author: Mark McClain <email address hidden>
Date: Mon Apr 9 10:08:00 2012 -0400

    return 404 for invalid api version request

    fixes bug: 934115

    This fix returns 404 for all non-root requests that route via the
    versions app. For root requests ('/') the available api version info is
    returned.

    Change-Id: I701389d9239cb40426f7a47206642b56c7eeeae1

tags: added: in-stable-essex
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-1 → 2012.2
Changed in quantum (Ubuntu):
status: New → Fix Released
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.