RESTFul API: Error handling mechanism
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":
{
"type": "TableAlreadyEx
}
}
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:
- 2.0.2
- Started by
- Alexander Chudnovets
- Completed by
- Alexander Chudnovets
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Add fault wrapper middleware
Addressed by: https:/
Use new fault handler for API v1