Error Handling
The CBC Cloud API uses standard HTTP response codes to indicate the success or failure of an API request.
Response Structure
When an error occurs, the response body will always contain a success: false boolean and a unique error_code string.
Machine Readable
{
"success": false,
"error_code": "AUTH_INVALID_GRANT"
}Reference Catalog
10 Standard Codes
| Error Code | Status | Description |
|---|---|---|
| AUTH_INVALID_CREDENTIALS | 401 | The email or password provided is incorrect. |
| AUTH_EMAIL_EXISTS | 400 | The email address is already registered in the system. |
| AUTH_UNAUTHORIZED | 401 | Missing or invalid authentication token. Check your Authorization header. |
| AUTH_FORBIDDEN | 403 | The authenticated user does not have permission to access requested resource. |
| AUTH_CODE_EXPIRED | 400 | The authorization code has expired (usually after 5 minutes). |
| AUTH_INVALID_GRANT | 400 | The provided authorization grant (code, refresh token) is invalid or expired. |
| VALIDATION_ERROR | 400 | General input validation error. Check your request body fields. |
| INVALID_REQUEST | 400 | The request is missing required parameters or is malformed. |
| NOT_FOUND | 404 | The requested resource or endpoint could not be found. |
| INTERNAL_SERVER_ERROR | 500 | An unexpected error occurred on the server. |
Localization Tip
Map these error codes to localized strings in your application's UI to provide a friendly experience for your users while keeping your backend logic standardized.