Skip to main content

Error Response Format

When an error occurs, the API returns a JSON response with the following structure:
error-response.json

HTTP Status Codes

2xx Success

Request was successful

4xx Client Error

Something was wrong with the request

5xx Server Error

Something went wrong on our end

Authentication Errors

How to Fix

Terminal
Common mistake: Make sure you’re using Bearer prefix before your API key. The format should be Authorization: Bearer un_your_api_key.

Validation Errors

Example Validation Error

validation-error.json

Handling Validation Errors

handle-validation.ts

Resource Errors

Example 404 Response

not-found.json

Rate Limit Errors

Rate Limit Response

rate-limit.json
See the Rate Limits documentation for handling strategies and retry logic examples.

Domain Errors

See Domain Verification guide for setting up DNS records correctly.

Server Errors

5xx errors are rare and usually temporary. Implement retry logic with exponential backoff for these errors.

Complete Error Handling Example

Quick Reference

Retryable Errors

  • 429 Rate limit exceeded
  • 500 Internal server error
  • 503 Service unavailable
  • 504 Gateway timeout

Non-Retryable Errors

  • 400 Validation error
  • 401 Authentication error
  • 403 Permission denied
  • 404 Resource not found