ERROR CODES
COSMOS error codes
Every COSMOS error carries one of these codes (problem+json error_code). Retryable errors can be tried again after a pause; a 429 says when.
| Code | Name | HTTP | Retry | Meaning |
|---|---|---|---|---|
COSMOS-AUTH-0001 | unauthorized | 401 | no | No token, a bad token, or an expired one. Sign in again. |
COSMOS-AUTHZ-0001 | forbidden_scope | 403 | no | The token does not carry the scope this tool needs, or the tenant is not yours. |
COSMOS-POLICY-0001 | policy_blocked | 403 | no | A policy rule refused the call (blocked domain, denied tool, evaluate off). |
COSMOS-POLICY-0002 | needs_confirmation | 202 | no | A person must approve this call. Detail has the confirmation id and the page to approve it. |
COSMOS-BROWSER-0001 | ref_stale | 409 | no | The element ref came from an older snapshot. Take a new browser.snapshot. |
COSMOS-BROWSER-0002 | bridge_offline | 503 | yes | No browser bridge is online for this user. |
COSMOS-RATE-0001 | rate_limited | 429 | yes | Too many actions in a short time. Wait for retry_after_ms. |
COSMOS-LEG-0001 | leg_unavailable | 503 | yes | The backend leg is down, its breaker is open, or it is at capacity. |
COSMOS-VALIDATION-0001 | invalid_argument | 400 | no | The input failed validation. The message names the field. |
COSMOS-VALIDATION-0002 | not_found | 404 | no | No such tool, job or resource for this caller. |
COSMOS-VALIDATION-0003 | conflict | 409 | no | An idempotency key was reused with different arguments, or a duplicate. |
COSMOS-LEG-0002 | timeout | 504 | yes | The call ran past its deadline. |
COSMOS-CALL-0001 | cancelled | 499 | no | The call was cancelled. |
COSMOS-LEG-0003 | upstream_error | 502 | yes | A leg or a third party answered with an error. |
COSMOS-BROWSER-0003 | session_stopped | 410 | no | The user pressed Stop or the browser session expired. |
COSMOS-CONFIG-0001 | not_configured | 503 | no | A credential or endpoint is not set yet (amber in STATUS). |
COSMOS-INTERNAL-0001 | internal | 500 | no | A bug. It has been logged with the request id. |