Error Reference
Complete reference for error codes and handling in the Fayda Authentication API.
Error Response Format
All API errors follow a consistent JSON format.
json
{
"success": false,
"error": "ERROR_CODE",
"message": "Human-readable error message",
"statusCode": 400,
"details": { /* Additional error details */ },
"timestamp": "2023-07-20T12:34:56.789Z"
}
Field | Type | Description |
---|---|---|
success | Boolean | Always false for error responses. |
error | String | A unique error code identifier (e.g., INVALID_FCN ). |
message | String | A human-readable description of the error. |
statusCode | Number | The HTTP status code. |
details | Object | An object containing additional, context-specific details about the error. |
timestamp | String | The ISO 8601 timestamp of when the error occurred. |
Authentication Errors
Error Code | HTTP Status | Description |
---|---|---|
UNAUTHORIZED | 401 | API key is missing or invalid. |
FORBIDDEN | 403 | API key does not have permission to perform this action. |
API_KEY_EXPIRED | 403 | The provided API key has expired. |
IP_NOT_ALLOWED | 403 | The request is from an IP address that is not allowed. |
Validation Errors
Error Code | HTTP Status | Description |
---|---|---|
INVALID_INPUT | 400 | The request body is malformed or missing parameters. |
INVALID_FCN | 400 | The provided FCN is not a valid format. |
INVALID_OTP | 400 | The provided OTP is incorrect or expired. |
TRANSACTION_NOT_FOUND | 404 | The provided transaction ID does not exist or has expired. |
Server & Fayda Errors
Error Code | HTTP Status | Description |
---|---|---|
INTERNAL_SERVER_ERROR | 500 | An unexpected error occurred on our servers. |
FAYDA_SERVICE_UNAVAILABLE | 503 | The Fayda service is temporarily unavailable. |
FAYDA_TIMEOUT | 504 | The request to the Fayda service timed out. |
Rate Limiting Errors
Error Code | HTTP Status | Description |
---|---|---|
RATE_LIMIT_EXCEEDED | 429 | You have exceeded the number of allowed requests. |