Skip to main content

The golden rule

Never crash on an API error. Every integration should gracefully degrade when Arcus is unavailable, rate-limited, or returns a validation error.

Error classification

Before writing retry logic, classify errors by whether they are safe to retry: Retrying a 422 Unprocessable Entity is wasted effort; the request will always fail until you fix the payload.

Exponential backoff

For transient errors and rate limits, use exponential backoff with jitter:

Idempotency on retry

Always use Idempotency-Key when retrying POST/PATCH/DELETE requests. Generate the key before the first attempt and reuse the same key on every retry:
If Arcus received and processed the original request but your network timed out, the retry returns the original response without creating a duplicate.

Handling specific errors

401 Unauthorized

Your API key is missing, invalid, or expired. Check:
  • Authorization header is present and starts with Bearer
  • Key has not been deleted in Settings > Developers
  • Key is for the correct mode (test vs live) for the environment you are calling

403 insufficient_scope

Your key lacks a required scope. The error includes required: <scope>:
Add the scope to your key in Settings > Developers, or create a new key with the correct scopes.

404 not_found

The resource does not exist or belongs to a different entity. Common causes:
  • Typo in the ID
  • Using a test-mode ID with a live-mode key
  • The record was deleted

409 conflict

State conflict. Common causes:
  • idempotency_key_mismatch: same key reused with a different body — generate a new key
  • resource_in_use: cannot delete a resource that is referenced elsewhere — see the references field in the error body for what is blocking the delete

422 Unprocessable Entity

Validation failure. The param field identifies which field failed and hint explains why:

Structured error logging

Log enough context to debug without logging sensitive data:

Circuit breaker

For high-volume integrations, add a circuit breaker to avoid hammering a degraded API:

Monitoring

Set up alerts on:
  • 5xx error rate spike (Arcus outage)
  • 429 rate rising (approaching rate limit; add backpressure or request a limit increase)
  • 401/403 errors (key expiry or accidental deletion)
Include request_id in your alert payloads so on-call engineers can share it with Arcus support.