10 ERROR REPRESENTATION
The Error representation defines a standard means for returning detailed diagnostics, typically when a server-side error (status code 500) occurs.
For example, the following might be the result of invoking an action where an exception occurred:
{
"message": "IllegalStateException",
"stackTrace": [
"at Somefile.java#foo():1234",
"at SomeOtherFile.java#bar():4321"
],
"causedBy": {
"message": "IllegalStateException",
"stackTrace": [
"at LibraryFile.java#foz():567",
"at LibraryOtherFile.java#baz():765"
]
},
"links": [ ... ],
"extensions": { ... }
}
where:
JSON-Property | Description |
---|---|
message |
the exception message, typically as generated by the underlying implementation programming language. |
stacktrace |
(optional) list of strings representing call stack |
causedBy |
(optional) underlying cause of the exception (to handle nested exception scenarios). |
links |
list of links to other resources |
extensions |
additional information about the resource |