Bug #451
Discrepancy in status codes returned by the API when getting and deleting a network that does not exist
Status: | Closed | Start date: | 12/15/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Daniel Molina | % Done: | 0% | |
Category: | - | |||
Target version: | Release 2.2 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: |
Description
When deleting a network, we get the following error if the network no longer exists:
crohr@parachute:~ $ curl -i http://server.ltd/network/1234 -u username:password -X DELETE
HTTP/1.1 500 Internal Server Error
Content-Type: text/html;charset=utf-8
Content-Length: 48
Connection: keep-alive
Server: thin 1.2.7 codename No Hup
[VirtualNetworkDelete] Error getting NET [1234].
I would much prefer the semantics of a 404, as in:
crohr@parachute:~ $ curl -i http://server.ltd/network/1234 -u username:password
HTTP/1.1 404 Not Found
Content-Type: text/html;charset=utf-8
Content-Length: 46
Connection: keep-alive
Server: thin 1.2.7 codename No Hup
[VirtualNetworkInfo] Error getting NET [1234].
Is that possible?
Associated revisions
Bug #451: Change OCCI return code when resource not found
Bug #451: Change OCCI return code when resource not found(cherry picked from commit 4928bb98688411dbcf361da0076fba6dc2a4f698)
History
#1 Updated by Ruben S. Montero over 10 years ago
- Target version changed from Release 2.0.1 to Release 2.2
#2 Updated by Ruben S. Montero over 10 years ago
- Status changed from New to Closed
- Resolution set to fixed
Changes in one-2.0 and master. Thanks for the feedback!