Clearer API Error Responses

Registered by Mike Perez on 2012-07-10

Currently the cinder api and other openstack apis when things are successful will return a JSON/XML response with the requested information, or the result of modifying a resource. Currently if something was to go wrong in these calls, an accepted RFC HTTP response code is returned. For complex calls like quota exceeded [1] there are a number of things that can go wrong where a 500 error is unhelpful, especially when the end user doesn't have access to the API logs to debug the issue further. Returning a JSON error response in the body instead would allow developers writing clients (python-cinderclient, Horizon) in programmatic fashion to handle these errors in raising the correct exception and provide something helpful to the end user.

[1] - https://bugs.launchpad.net/python-cinderclient/+bug/1013417

Blueprint information

Status:
Complete
Approver:
John Griffith
Priority:
High
Drafter:
Mike Perez
Direction:
Approved
Assignee:
Mike Perez
Definition:
Superseded
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Mike Perez on 2012-11-20
Completed by
Mike Perez on 2012-12-15

Related branches

Sprints

Whiteboard

Need to get v2 blueprint out first: https://blueprints.launchpad.net/cinder/+spec/cinder-apiv2

After doing an audit I have found this commit taking care of the reported issues:

https://github.com/openstack/cinder/commit/f7938c0b96c047490b6eb935cbf882505ce4a811

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.