Since HTTP error codes do not work with cross-domain AJAX calls and JSONP requests, errors are returned in JSON format with a normal HTTP 200 status.
Note: For security reasons, JSONP is not supported in Elvis 6.
If you want your server to produce errors as normal HTTP status codes instead of the JSON error object, set sendServiceErrorAsJson=false in your server config.
JSON error response
- errorcode The error code. This is the value that would have been returned as http status code.
- message A short message indicating why the operation failed.
{
"errorcode" : 401,
"message" : "Not logged in"
}
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.