Exception
If an error occurs while executing the REST API, then the web service responds with a 4xx HTTP status, such as "400 Bad Request" or "401 Unauthorized".
The response contains an "exception" as a JSON structure. This exception contains an error code "errorCode", a text "errorMessage" with possible hints about the error and an (optional) "stackTrace".
{
"errorMessage":"Web service parameter error",
"errorCode":-14,
"stackTrace":"...."
}
The exception will be sent either as a JSON structure or as an XML structure, depending on what the original request used.
The structure will contain the following values:
errorCode (integer) - Error number
errorMessage - Description of error
stackTrace - Stack trace on the server where the error occurred (usually only important for Support)
Example of a call when the session token is invalid:
curl -X GET -i -H 'Accept: application/json' -H 'Authorization: Bearer eyJraWQiOiJyb3ZZTFQ4TXgwcTd1WW1i ... CO2TLHCiQCsuMf-1Vw' http://localhost:8080/webPDF/rest/documents/605c045c129a40adb95d7623e279fe8a/info
HTTP/1.1 401
...
{
"errorMessage": "Session for provided token not found",
"errorCode": -60,
"stackTrace": "..."
}