General Error Model & Codes
Description
All Finrota CAT API services use a standard error message format. This makes it easy to understand and resolve errors.
-
Error Format: Usually includes a statusCode (HTTP error code), error (error type), and message (error details)
-
Common HTTP Errors:
- 200 OK: Operation successful.
- 400 Bad Request: The request is invalid or incomplete.
- 401 Unauthorized: AccessToken is invalid or missing.
- 403 Forbidden: You do not have permission to perform this action.
- 404 Not Found: The requested record could not be found.
- 409 Conflict: There is a conflicting situation (e.g., sending the same ERP code again).
- 429 Too Many Requests: You have exceeded the defined limits.
- 500 Internal Server Error: A general server-side error occurred.
Common HTTP Codes and Their Meanings
| Code | Meaning |
|---|---|
| 200 | OK → Operation successful, result returned |
| 200 | OK + [] → Operation successful but no matching records found |
| 201 | Created → New record successfully created |
| 204 | No Content → Operation successful, but no body was returned |
| 400 | Bad Request → Parameter error or invalid request |
| 401 | Unauthorized → AccessToken missing or invalid |
| 403 | Forbidden → Authorization not available |
| 404 | Not Found → Related record not found |
| 409 | Conflict → Conflicting operation (e.g., marking the same ERP code a second time) |
| 422 | Unprocessable Entity → Validation errors (missing/invalid fields) |
| 429 | Too Many Requests → Limit exceeded (per-minute/request limits) |
| 500 | Internal Server Error → General server error |
| 503 | Service Unavailable → Service is temporarily unavailable |