Reliability
Error Codes
Use HTTP status codes and structured error codes to handle ALEFBA API failures.
Error envelope
{
"success": false,
"error": {
"code": "invalid_key",
"message": "API key is invalid or has been revoked."
}
}Documented errors
| HTTP | Code | Meaning | Client action |
|---|---|---|---|
400 | Request-dependent | Invalid JSON, parameters or request data. | Correct the request; do not blindly retry. |
401 | missing_key | Bearer API key was not supplied. | Add the Authorization header. |
401 | invalid_key | Key is invalid, inactive or revoked. | Stop and replace or reactivate credentials. |
404 | Request-dependent | Route or authorized resource was not found. | Verify the endpoint and identifier. |
429 | rate_limited | Daily allowance was reached. | Delay further requests. |
500 | Request-dependent | Unexpected server failure. | Retry cautiously and contact support if persistent. |
Handling guidance
- Branch primarily on the HTTP status and structured
error.code. - Show user-safe messages instead of exposing internal diagnostics.
- Log a request identifier when the API provides one.
- Never log Bearer credentials.