OpenStack Neutron (virtual network service)

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

Reported by Salvatore Orlando on 2012-02-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Mark McClain
quantum (Ubuntu)
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.

Maru Newby (maru) wrote :

How do I reproduce this problem?

Changed in quantum:
assignee: nobody → Maru Newby (maru)

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

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

Changed in quantum:
status: New → In Progress

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) on 2012-05-23
Changed in quantum:
milestone: none → folsom-1
status: Fix Committed → Fix Released

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) on 2012-09-27
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  Edit
Everyone can see this information.

Other bug subscribers