Skip to main content

Error Code Handling

Error handling should classify failures by caller action: retry later, change request, fail over, wait for sync, or escalate operationally.

ClassExamplesClient action
Timeout or connection resetDeadline exceeded, TCP reset, gateway timeoutRetry within budget with backoff; then surface unknown status.
Rate limitHTTP 429, quota exceededHonor Retry-After; reduce concurrency.
Unauthorized/forbiddenHTTP 401/403, invalid key, disallowed methodDo not retry unchanged; fix credentials or policy.
JSON-RPC protocol-32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params, -32603 internal errorFix request for client errors; retry internal errors only within budget.
Stale or lagging nodeBlock not found, minimum slot not reached, stale checkpoint, node behindFail over to healthier node or wait.
Retention/historyPruned block, unavailable slot, old ledger versionUse archive/indexer endpoint; do not retry hot public RPC indefinitely.
Transaction rejectedInsufficient funds, invalid signature, simulation failureDo not retry until transaction changes.
type ErrorAction = 'retry' | 'fix_request' | 'failover' | 'wait_for_sync' | 'use_archive' | 'escalate';

:::warning Unknown submit status A timeout after transaction submission is not proof of failure. Check chain state before resubmitting. :::

Expose normalized error categories to application code while preserving raw node responses for debugging.