Provide codified error responses in placement

Registered by Chris Dent

This blueprint aims to extend the placement API to include detailed, consistent error messages in the response body to allow clear distinctions between different errors that use the same HTTP status code.

Error conditions in the placement REST API are signalled by HTTP status codes
and message bodies. For some of the errors it is impossible to distinguish the
reason why a particular response was issued other than reading the message
which was returned in the response body. This approach creates a strong
coupling between client code and the exact message of the error response. This
is very fragile in the face of change.

We propose to extend existing HTTP error responses with a ``code`` field as
described in the API-WG Errors_ specification. This will help consumers of the
API to easily recognize the type of the error cases. Note that the new format
of the response is for ``application/json`` only.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Medium
Drafter:
Chris Dent
Direction:
Approved
Assignee:
Chris Dent
Definition:
Approved
Series goal:
Accepted for rocky
Implementation:
Implemented
Milestone target:
milestone icon rocky-1
Started by
Matt Riedemann
Completed by
Matt Riedemann

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:cd/placement-error-code,n,z

Addressed by (nova-specs): https://review.openstack.org/418393
    Provide error codes for placement API

Addressed by (nova): https://review.openstack.org/546177
    Provide framework for setting placement error codes

Gerrit topic: https://review.openstack.org/#q,topic:bp/placement-api-error-handling,n,z

Approved for Rocky on April 4. -- mriedem 20180404

I don't see any other patches for this blueprint beside https://review.openstack.org/#/c/546177/ which merged today so considering this complete. -- mriedem 20180419

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.