Skip to main content

Error Handling

The Partner API uses standard HTTP status codes and returns consistent JSON responses when errors occur.

Error Response Format

{
"message": {
"key": "RES000001",
"value": "Error description"
}
}

HTTP Status Codes

CodeDescriptionAction
200SuccessRequest completed successfully
400Bad RequestCheck request parameters and body
401UnauthorizedVerify your API key (X-Cloudbric-Key header)
404Not FoundVerify the resource path or ID
409ConflictResource already exists (e.g., duplicate IP)
422Unprocessable EntityCheck the request body validity (e.g., max limit exceeded)
500Internal Server ErrorServer issue. Retry after a short delay

Error Handling Best Practices

  1. Always check the HTTP status code first.
  2. Use the message.key field (e.g., RES000001) to identify specific errors.
  3. Use the message.value field for a human-readable error description.
  4. Retry 5xx errors with exponential backoff.