HTTP GET on an already deleted Audit returns a 500 HTTP status code
Bug #1533217 reported by
Vincent Françoise
on 2016-01-12
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| watcher |
Low
|
Unassigned |
Bug Description
When trying to retrieve an Audit which either does not exist at all or got previously deleted, we get a misleading status code. As the resource dos not exist, one would expect to have a 404 status code instead of a 500 status code as it is currently the case.
So the objective is to return a 404 NOT FOUND in this scenario. Also, the correct/specific exception should be raised, i.e. AuditNotFound.
Vincent Françoise (vincent-francoise)
on 2016-01-12
Changed in watcher: | |
status: | New → Confirmed |
Taylor Peoples (tpeoples) wrote : | #1 |
Antoine Cabot (antoinecabot)
on 2016-01-18
Changed in watcher: | |
milestone: | none → mitaka-2 |
Taylor Peoples (tpeoples)
on 2016-01-18
Changed in watcher: | |
status: | Confirmed → Incomplete |
@tpeoples: Well, just like for https:/
Changed in watcher: | |
status: | Incomplete → Fix Released |
Antoine Cabot (antoinecabot)
on 2016-01-19
Changed in watcher: | |
importance: | Undecided → Low |
To post a comment you must log in.
I wasn't able to reproduce this, either with the CLI or with a REST call:
stack@vm: ~/devstack$ watcher audit-show f4bd946f- 8289-4024- ba2c-e150e786d0 af
Audit %(audit)s could not be found (HTTP 404)
REST returns a 404 with the following response:
{ message" : "{\"debuginfo\": null, \"faultcode\": \"Client\", \"faultstring\": \"Audit %(audit)s could not be found\"}"
"error_
}
It doesn't look like the audit ID in the exception message is being substituted in properly though.