← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1285437] [NEW] HTTPNotFound response does not contain enough explanation

 

Public bug reported:

In each RESTful API, there are useful explanation messages for HTTPNotFound response in the implementation.
However, some messages are not output to the response.
For example, the implementation of the pause action API contains "Server not found" message for nonexistent server error, but now the message is not output into the response like the following:

$ curl -i 'http://localhost:8774/v2/<project-id>/servers/<nonexistent-server-id>/action' -X POST [..]" -d '{"pause": null}'
HTTP/1.1 404 Not Found
Content-Length: 78
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-a5282f5e-7e59-48cf-a86b-fe2e34347a2f
Date: Thu, 27 Feb 2014 10:21:52 GMT

{"itemNotFound": {"message": "The resource could not be found.", "code": 404}}
$

When receiving the above message, client may consider "what is not found? project, server, or action?"
so it is better to output right message into a response.

** Affects: nova
     Importance: Undecided
     Assignee: Ken'ichi Ohmichi (oomichi)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Ken'ichi Ohmichi (oomichi)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1285437

Title:
  HTTPNotFound response does not contain enough explanation

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  In each RESTful API, there are useful explanation messages for HTTPNotFound response in the implementation.
  However, some messages are not output to the response.
  For example, the implementation of the pause action API contains "Server not found" message for nonexistent server error, but now the message is not output into the response like the following:

  $ curl -i 'http://localhost:8774/v2/<project-id>/servers/<nonexistent-server-id>/action' -X POST [..]" -d '{"pause": null}'
  HTTP/1.1 404 Not Found
  Content-Length: 78
  Content-Type: application/json; charset=UTF-8
  X-Compute-Request-Id: req-a5282f5e-7e59-48cf-a86b-fe2e34347a2f
  Date: Thu, 27 Feb 2014 10:21:52 GMT

  {"itemNotFound": {"message": "The resource could not be found.", "code": 404}}
  $

  When receiving the above message, client may consider "what is not found? project, server, or action?"
  so it is better to output right message into a response.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1285437/+subscriptions


Follow ups

References