/
REST Error Handling
Target release | 7.0 |
---|---|
Epic | |
Document status | DRAFT |
Document owner | @Trip Gilman |
Designer | |
Tech lead | |
Technical writers | |
QA |
Page Properties
Objective
Provide a standardized way for errors to be returned from REST requests made to OpenMethods service endpoints.
Requirements
Requirement | User Story | Importance | Jira Issue | Notes |
---|---|---|---|---|
Follow REST best practices for errors | HIGH | |||
Ability to differentiate between system level errors and application errors |
|
|
|
|
Support for compound errors | ||||
Error content should be context survivable | The error content should contain enough information about the context in which it happened so it can be logged and understood later |
User interaction and design
Example Error Content
{
"requestURL": "<full url that produced the error>",
"requestMethod": "<GET | POST | PUT | PATCH | DELETE | OPTIONS>",
"requestBody": "<any post/put/patch content of the request>", //optional
"httpStatus": "<http response code>",
"errorCode": "<error code>", //optional
"errorMessage": "<human readable error message>",
"errorRawMessage": "<original third-party error message>", //optional
"stackTrace": "<encoded text blob containing language specific stack trace information>", //optional
"causedBy": //optional
{
<full content of error>
}
}Open Questions
Question | Answer | Date Answered |
---|---|---|