RESTFul API: Error handling mechanism

Registered by Ilya Sviridov

Define error response format
Improve error messages with additional diagnostic information

MagnetoDB can have very wide set of error classes.

One option to support large set of errors is to extend our classes from oslo common.exceptions

Response body can be like this (this is body from Heat):

{
    "explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect."
    "code": 400
    "error":
       {
          "message": "Table 'testtempest1686253921' already exists",
          "traceback": None,
          "type": "TableAlreadyExistsException"
      }
}

Blueprint information

Status:
Complete
Approver:
Ilya Sviridov
Priority:
High
Drafter:
Alexander Chudnovets
Direction:
Approved
Assignee:
Alexander Chudnovets
Definition:
New
Series goal:
Accepted for 2.0
Implementation:
Implemented
Milestone target:
milestone icon 2.0.2
Started by
Alexander Chudnovets
Completed by
Alexander Chudnovets

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/84694
    Add fault wrapper middleware

Addressed by: https://review.openstack.org/84738
    Use new fault handler for API v1

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.