2. Standardized Error Code
When an API request fails, the system returns a standardized response. To assist in programmatically handling specific failure conditions, the status_code field always adheres to the [{status}/{variation}] format.
{
"success": false,
"message": "The 'email' field does not match the expected format.",
"status_code": "[400/invalid_format]"
}
Error Code Reference
| Error Code | HTTP Status | Accompanying Message | Cause & Resolution |
|---|---|---|---|
[400/missing_field] | 400 Bad Request | "A required field is missing from the payload." | A mandatory parameter is absent. Check the documentation for required fields. |
[400/invalid_format] | 400 Bad Request | "The provided value does not match the expected format." | Usually occurs with malformed emails, dates (e.g., non-ISO 8601), or UUIDs. |
[400/invalid_value] | 400 Bad Request | "The provided value is outside the allowed options." | Ensure the value matches the allowed constraints. |
[400/out_of_range] | 400 Bad Request | "The provided value is outside the permitted range." | An integer or string length exceeds the allowed minimum/maximum limits. |
[401/session_missing] | 401 Unauthorized | "No active session cookie was provided." | The session are missing from request header. |
[401/session_expired] | 401 Unauthorized | "The current session has expired." | The provided session is no longer valid. Login to get a new session |
[403/insufficient_permission] | 403 Forbidden | "The token does not have the required permissions." | The credentials are valid, but they lack the specific permission to perform this action. |
[404/resource_not_found] | 404 Not Found | "The requested resource could not be found." | The endpoint route is incorrect, or the specific ID provided does not exist. |
[409/resource_conflict] | 409 Conflict | "The resource already exists or is in a conflicting state." | You are trying to create a duplicate record (e.g., an email that is already registered). |
[500/internal_server_error] | 500 Internal Server Error | "An unexpected error occurred on the server." | An unexpected error occurred on the server. Try again later. |