Handling API error response
WebAPI returns HTTP 2XX if the request is successful and returns standard error codes if any error occurs (functional/technical) at the App server end. The error response always follows this specific structure.
{
"error": {
"Code": "-100",
"Message": "No data found for Symbol FORMULA id EX-001\0001k",
"AdditionalMessage": ""
}
}
HTTP Status Code | Comment |
---|---|
200 | API call is successful |
400 |
Bad Request If API call is failed with Data error |
404 |
Requested data not found If API call is failed with Data error |
500 |
Internal Server Error If API call is failed with App Server or technical error |