Info: The sendServiceErrorAsJson option described in this article has been deprecated and cannot be used anymore. For error reporting, use the returnStatusOkOnErrorForServicesApi option on the Cluster properties page of the Management Console instead. For details, see the comments of that option.
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 Assets Server.
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.
2 comments
I think it would be helpful to document the recently-added returnStatusOkOnErrorForServicesApi cluster property on this page:
Hi Tim,
Thank you for the feedback. I passed it on to the developers and it turns out that the sendServiceErrorAsJson option described in this article has actually been deprecated and cannot be used anymore. I have added a note to this article to point this out and to refer to the returnStatusOkOnErrorForServicesApi option.
Best regards,
Maarten van Kleinwee
Senior Technical Writer, WoodWing Software
Please sign in to leave a comment.