Skip to main content
Every failure is a JSON-RPC error object: { "code": int, "message": string, "data"?: any }. Codes in the -32000..-32099 block are RCP-specific; the rest are standard JSON-RPC.

Error codes

The range -32000..-32099 is reserved for RCP. Implementations MUST NOT invent codes outside it; put extra machine-readable detail in error.data.

Structured error.data

The optional data object carries machine-readable detail so a client can react without string-parsing message:
boolean
Whether retrying may succeed. Overrides the code-based default.
integer
Server-suggested backoff before retrying (pairs with RateLimited).
string
The offending parameter or filter field name (pairs with InvalidParams).
string
The unsupported option value (pairs with OptionUnsupported).
RateLimited and BackendUnavailable are transient by default; the rest are not (unless data.retryable says otherwise).
Every SDK surfaces errors as a typed RcpError (or RuntimeError) whose message is "[RCP <code>] <message>" and which exposes .code, .data, retryable(), and retryAfterMs().