Skip to main content
This page covers all error responses you may encounter when calling Endprompt endpoints.

Error Response Format

All errors follow a consistent format:

HTTP Status Codes

Error Types

401 Unauthorized

Causes:
  • x-api-key header is missing
  • API key is invalid or malformed
  • API key has been revoked
Solutions:

403 Forbidden

Causes:
  • Endpoint is private/internal
  • API key doesn’t have permission

404 Not Found

Causes:
  • Typo in endpoint path
  • Endpoint was deleted
  • Wrong tenant subdomain
Solution: Verify the endpoint exists in your dashboard.

422 Validation Error

Common validation errors:

429 Rate Limited

Response Headers:
Handling:

500 Server Error

What to do:
  1. Note the request_id
  2. Retry the request (may be transient)
  3. Contact support with the request ID if persistent

502 Bad Gateway

Causes:
  • LLM provider (OpenAI, Anthropic) is down
  • Provider rate limits exceeded
  • Invalid provider API key in settings

504 Timeout

Causes:
  • Very long input text
  • Complex prompt requiring extended processing
  • LLM provider slowdown
Solutions:
  • Reduce input size
  • Simplify the prompt
  • Increase client timeout setting

Error Handling Best Practices

Implement Exponential Backoff

Log Request IDs

Handle Specific Errors

Testing Error Handling

Test your error handling by:
  1. Missing field — Omit a required field
  2. Invalid type — Send string instead of number
  3. Invalid key — Use a fake API key
  4. Rate limit — Send many rapid requests

Next Steps

Logs & Monitoring

Debug issues using execution logs

Support

Contact support with request IDs