Error Reference
Error Reference
Complete reference for BrainUs API error codes and troubleshooting
This guide provides a complete reference for all error codes returned by the BrainUs API, along with troubleshooting steps.
Error Response Format
All API errors follow a consistent JSON structure:
{
"error": {
"code": "authentication_failed",
"message": "Invalid API key",
"details": {
"reason": "The provided API key is invalid or has been revoked"
}
}
}HTTP Status Codes
| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | API key lacks required permission |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error |
| 503 | Service Unavailable | Service temporarily down |
Need help? Contact developer@brainus.lk
Error Categories
- Common Errors - Most frequent errors and fixes
- Authentication Errors - API key issues
- Rate Limit Errors - Quota exceeded
- Validation Errors - Invalid parameters