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

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.

Tags: api Edit Tag help
Changed in watcher:
status: New → Confirmed
Taylor Peoples (tpeoples) wrote :

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-e150e786d0af
Audit %(audit)s could not be found (HTTP 404)

REST returns a 404 with the following response:

    "error_message": "{\"debuginfo\": null, \"faultcode\": \"Client\", \"faultstring\": \"Audit %(audit)s could not be found\"}"

It doesn't look like the audit ID in the exception message is being substituted in properly though.

Changed in watcher:
milestone: none → mitaka-2
Changed in watcher:
status: Confirmed → Incomplete

@tpeoples: Well, just like for, the problem is not there anymore for me so since it works for you as well, I guess I can put it as released.

Changed in watcher:
status: Incomplete → Fix Released
Changed in watcher:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers