i have implemented the Rest SOE and everything working fine except returning the error.when i raising the exception still response status code is 200 OK and in body i found the exception code and Message. i want that my client catch that exception rather then reading the response and then figure out it is exception or normal response.
i also try to do the same as describe here but still status is 200 Ok and X-HTTP-Status is shown in header
SOE REST Service - Is it possible to send the http status code from the operation
Thanks
Haider
If you use JavaScript client, JSONP callbacks to work you need always send a status of 200.
So REST API sends a status code of 200 even when your request failed.
You can add the HTTP status in a error JSON object or you can set a custom HTTP header using responseProperties.
For instance:
responseProperties = "{
application/pdf
\",