CBC Dev

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 CodeStatusDescription
AUTH_INVALID_CREDENTIALS401The email or password provided is incorrect.
AUTH_EMAIL_EXISTS400The email address is already registered in the system.
AUTH_UNAUTHORIZED401Missing or invalid authentication token. Check your Authorization header.
AUTH_FORBIDDEN403The authenticated user does not have permission to access requested resource.
AUTH_CODE_EXPIRED400The authorization code has expired (usually after 5 minutes).
AUTH_INVALID_GRANT400The provided authorization grant (code, refresh token) is invalid or expired.
VALIDATION_ERROR400General input validation error. Check your request body fields.
INVALID_REQUEST400The request is missing required parameters or is malformed.
NOT_FOUND404The requested resource or endpoint could not be found.
INTERNAL_SERVER_ERROR500An 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.