Error Handling
EnableX Service Administration API service uses JSON result codes to indicate whether a method completed successfully. These response codes provide a description of problems that may have occurred with an API call, which can help you in troubleshooting the problems.
Result Code Grouping
The response codes of the UCaaS API are grouped into the following categories:
Code | Category | Description |
---|---|---|
1xx | Information | The request is received and processed. |
2xx | Success | The request is received and accepted. |
3xx | Redirection | Action is required to complete the request. |
4xx | Client Error | Illegible request syntax. The request cannot be fulfilled. |
5xx | Server Error | The server failed to complete a legitimate request. |
Response Codes
The response codes of the UCaaS API are grouped into the following categories:
- Common HTTP Status Codes
Code | Description |
---|---|
200 | OK success status: the request has succeeded. |
400 | The header is missing. Add a valid header. |
401 | An invalid header is used. |
403 | The token has expired. |
404 | Not Found. |
406 | Unprocessable entity, validation has failed. |
500 | An internal server error has occurred. |
1001 | The token is not valid. |
1002 | The request is invalid. |
- Application Specific Common Error Codes
Code | Description |
---|---|
0 | Error. |
1 | Success. |
1401 | The application type must be specified. |
1402 | The application must be a string. |
1403 | Only a valid application must be passed. |
Success Response: Successful API calls always return a JSON with HTTP 200 response code and 1
result code. For example:
{ "result": "1","data": {}}
The data
object is optional. It is a dummy name named after the requested data to contain the related key fields.
Error Response: Unsuccessful API calls return a JSON with a non—zero result code. The error response in the JSON includes 3 keys: result code, error, and description. For example:
{ "result": "1504","msg": "Duplicate data","desc": "The Email Address is already registered.","data": {}}