Skip to main content

Error Codes & Handling

Complete guide to RegPilot API errors and how to handle them.

HTTP Status Codes

Error Response Format

All errors return JSON with this structure:

Common Errors

400 Bad Request

Missing Required Field

Solution:

Invalid Quality Tier

401 Unauthorized

Missing API Key

Solution:

Invalid API Key

Solution: Verify your API key in the dashboard and regenerate if needed.

429 Too Many Requests

Response Headers:
  • Retry-After: 60 (seconds)
  • X-RateLimit-Limit: 100
  • X-RateLimit-Remaining: 0
  • X-RateLimit-Reset: 1699999999
Solution:

500 Internal Server Error

Solution: Contact support@regpilot.dev with the request_id.

Error Handling Patterns

Basic Error Handling

Advanced Error Handling

Python Error Handling

Validation Errors

Invalid Message Format

Token Limit Exceeded

Best Practices

1. Always Check Status

2. Implement Exponential Backoff

3. Log Request IDs

4. Circuit Breaker Pattern


Next: Rate Limits →