Skip to main content

Error handling

CortexRuntimeError exposes a code and outcome classification. Distinguish rejected validation/authority from uncertain issued mutations; an uncertain result does not authorize a new paid attempt.

Code or stateHost action
INVALID_INPUTFix the submitted contract; preserve the intended semantic identity
UNAUTHENTICATED, FORBIDDEN, AUTHORITY_EXPIRED, SESSION_CHANGEDClear/close the affected protected view and verify current identity/grants
AUTHENTICATION_TIMEOUT, AUTH_TOKEN_FETCH_FAILEDInspect host token refresh/official handshake
RPC_DEADLINE_EXCEEDEDRecover the original request/run/job; it may have executed
IDEMPOTENCY_CONFLICTSame replay identity carried changed input; resolve the intended request
POLICY_DENIEDOperator checks qualified function/interface/capability/version and bounds
CAPABILITY_UNAVAILABLE, PROFILE_NOT_READYConfigure the required capability/profile; never invent success/fallback
Context/barrier failureInspect captured stage cutoff and watermark hole
submission_unknown / content unknownReconcile saved operation; no blind redispatch

Disconnect closes an observer. Cancel requests backend cancellation/fences publication; it does not prove an upstream stop/refund. Missing cost data is incurred uncertainty, and an unresolved provider operation can retain liability/concurrency.

Scope/identity changes invalidate old handles. Ignore stale callbacks from an old view after reconnecting a newer one. Clear all private text/history/recall/artifact/job/previews on authority loss; ordinary network errors can preserve the currently authorized view for recovery.

Explicit domain/admin APIs may return committed partial receipts or throw a receipt-bearing error. Inspect the receipt before repeating an effect. See resilience, model policy and runtime client.