Skip to main content

Overview

The Cevoid API uses standard HTTP status codes to indicate the success or failure of your requests. Understanding these codes will help you build robust applications that can properly handle different scenarios.

HTTP Status Codes

Success

  • 200 - Successful response: The request was processed successfully

Client Errors

  • 400 - Bad request: There was an error in your request (client-side error)
  • 401 - Unauthorized: Invalid or missing authentication credentials
  • 403 - Forbidden: The request is not allowed (insufficient permissions)
  • 404 - Not found: The requested resource does not exist

Server Errors

  • 402 - Request failed: Valid parameters were provided, but the request failed
  • 500 - Internal server error: An error occurred on Cevoid’s servers

Error Types

The Cevoid API returns errors with specific types to help you understand what went wrong:

invalid_request

Issues with your request (most common):
  • Missing required parameters
  • Invalid parameter values
  • Malformed request body
  • Authentication problems

api_error

Issues on Cevoid’s side (rare):
  • Internal server problems
  • Service temporarily unavailable
  • Database connectivity issues

Error Response Format

When an error occurs, the API returns a structured error response:

Response Fields

  • type: The error category (invalid_request or api_error)
  • message: Human-readable description of the error
  • documentation_url: Link to relevant documentation

Common Error Scenarios

Authentication Errors (401)

Solution: Verify your API key is correct and properly formatted in the x-api-key header.

Resource Not Found (404)

Solution: Check that the resource ID exists and you have permission to access it.

Invalid Parameters (400)

Solution: Review the API documentation for correct parameter values and formats.

Error Handling Best Practices

1. Always Check Status Codes

2. Handle Different Error Types

3. Implement Retry Logic

For api_error types (500, 502 status codes), implement exponential backoff retry logic as these are typically temporary server issues.

4. Log Errors for Debugging

Never expose API keys or sensitive information in error logs or user-facing error messages.