Identity API v3 nonstandard response code format

Bug #1338128 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Wishlist
Jorge L. Williams

Bug Description

This is similar to bugs 1338123 and 1338124 which I opened against the "Identity API v2.0 Reference", but this one is against the "Identity API v3" api-ref (http://developer.openstack.org/api-ref-identity-v3.html)

The error response codes are listed like this: "identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)"

There are a few issues with this.

First, the way that response codes are described is nonstandard. The HTTP 1.1 standard lists the response codes and reason phrase, and HTTP servers respond with the code and phrase, like "400 Bad Request" and "503 Service Unavailable", not like "badRequest (400)" or "serviceUnavailable(503)". So "badRequest (400)" should be "400 Bad Request", "serviceUnavailable(503)" should be "503 Service Unavailable", and so forth.

Second, this one has "identityFault (400, 500, …)". This is not useful because it seems to indicate that any response code is identityFault. "identityFault (400, 500, …)" should be removed from "Error response codes".

The text seems to indicate that 405 is "Bad Method", but HTTP 1.1 defines it as "405 Method Not Allowed" -- http://tools.ietf.org/html/rfc2616#section-10.4.6

Similar for 404. HTTP 1.1 defines the phrase for this as "Not Found" and not "Item Not Found" -- http://tools.ietf.org/html/rfc2616#section-10.4.5

Similar for 413. "overLimit (413)" should be "414 Request-URI Too Long" http://tools.ietf.org/html/rfc2616#section-10.4.14

Revision history for this message
Brant Knudson (blk-u) wrote :

This is interesting... this page has response codes as I'd expect to see them: http://docs.openstack.org/api/openstack-network/2.0/content/update_extra_route.html

Revision history for this message
Brant Knudson (blk-u) wrote :

it looks like http://docs.openstack.org/api/openstack-network/2.0/content/update_extra_route.html uses a hardcoded docbook string rather than wadl change.

affects: openstack-manuals → openstack-api-site
Revision history for this message
Anne Gentle (annegentle) wrote :

Will also be addressed with https://review.openstack.org/#/c/106173/ as per my request on that patch.

Revision history for this message
Anne Gentle (annegentle) wrote :

Related to the comments #1 and #2 we have this bug logged against the toolchain for outputting different output despite using the same source WADL: https://bugs.launchpad.net/openstack-manuals/+bug/1342379

Changed in openstack-api-site:
status: New → Confirmed
status: Confirmed → In Progress
assignee: nobody → Jorge L. Williams (jorgew)
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/89291
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=44511224105bfe5192fbf265933bef6d749cfe22
Submitter: Jenkins
Branch: master

commit 44511224105bfe5192fbf265933bef6d749cfe22
Author: Brant Knudson <email address hidden>
Date: Sat Nov 29 10:02:28 2014 -0600

    Use HTTP response codes for identity v3

    The HTTP 1.1 standard (http://tools.ietf.org/html/rfc2616)
    defines the "reason phrase" for each status code. For example,
    400 is Bad Request, 404 is Not Found, etc.

    The identity V3 API reference had unexpected values listed for
    the return codes for different requests, such as
    "identityFault" and "overLimit".

    There's no HTTP response code for identityFault, so this was
    removed.

    The others were changed to use the standard reason phrase.

    Closes-Bug: #1338128

    Change-Id: I5ea51cf456fed9d14e4296b6e0bf19c8fd0f02bb

Changed in openstack-api-site:
status: In Progress → 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.