Skip to main content

Error Format


HTTP Status Codes


Common Errors

401 - Invalid Token

Fix: Refresh your M2M token or verify the JWT session is valid.

403 - Missing Scope

Fix: Request credentials with the required scope.

429 - Rate Limited

Headers:
Fix: Wait for Retry-After seconds.

402 - Insufficient Credits

Fix: Purchase credits at dashboard.cuadra.ai or wait for monthly reset.

Rate Limits


Retry Logic

Implement exponential backoff for 429 and 5xx errors:

Best Practices

  1. Check status before parsing — Don’t assume success
  2. Implement retries — For 429 and 5xx errors
  3. Log error details — Include detail message for debugging
  4. Show user-friendly messages — Don’t expose raw errors to users
  5. Monitor error rates — Alert on spikes

FAQ

What format do Cuadra AI errors use?

All errors follow RFC 7807 Problem Details format with type, title, status, and detail fields.

How should I handle rate limits (429)?

Implement exponential backoff. Wait the time specified in Retry-After header, then retry. See retry logic examples above.

What does “insufficient_credits” mean?

Your organization has run out of credits. Purchase more at dashboard.cuadra.ai or upgrade your plan.

Authentication

Fix auth errors

Credits

Handle credit errors