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"
}
FieldTypeDescription
successBooleanAlways false for error responses.
errorStringA unique error code identifier (e.g., INVALID_FCN).
messageStringA human-readable description of the error.
statusCodeNumberThe HTTP status code.
detailsObjectAn object containing additional, context-specific details about the error.
timestampStringThe ISO 8601 timestamp of when the error occurred.
Authentication Errors
Error CodeHTTP StatusDescription
UNAUTHORIZED401API key is missing or invalid.
FORBIDDEN403API key does not have permission to perform this action.
API_KEY_EXPIRED403The provided API key has expired.
IP_NOT_ALLOWED403The request is from an IP address that is not allowed.
Validation Errors
Error CodeHTTP StatusDescription
INVALID_INPUT400The request body is malformed or missing parameters.
INVALID_FCN400The provided FCN is not a valid format.
INVALID_OTP400The provided OTP is incorrect or expired.
TRANSACTION_NOT_FOUND404The provided transaction ID does not exist or has expired.
Server & Fayda Errors
Error CodeHTTP StatusDescription
INTERNAL_SERVER_ERROR500An unexpected error occurred on our servers.
FAYDA_SERVICE_UNAVAILABLE503The Fayda service is temporarily unavailable.
FAYDA_TIMEOUT504The request to the Fayda service timed out.
Rate Limiting Errors
Error CodeHTTP StatusDescription
RATE_LIMIT_EXCEEDED429You have exceeded the number of allowed requests.