update-volume API should return BadRequest response if specified volume with request body is not existent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Ken'ichi Ohmichi | ||
Newton |
In Progress
|
Medium
|
Lee Yarwood |
Bug Description
As the following part of API-WG guidline[1],
If a request contains a reference to a nonexistent resource in the
body (not URI), the code should be 400 Bad Request. Do not use 404
NotFound because :rfc:`7231#
the origin server did not find a current representation for the
target resource for 404 and representation for the target resource
means a URI
Nova should return a BadRequest response if specified resource with request body is not existent.
However, update-volume API returns a NotFound response instead.
That is a common mistake on REST API and we need to change it to BadRequest.
[1]: https:/
Changed in nova: | |
status: | In Progress → Fix Released |
importance: | Undecided → Medium |
The patch is https:/ /review. openstack. org/#/c/ 379044/