@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / RpcError

Class: RpcError

Defined in: packages/sdk/src/errors.ts:194

A JSON-RPC / WebSocket request to the node did not complete.

Details

Transport-level only — the request never produced a chain answer (connection refused, timeout, unsupported method, subscription dropped).

Gotchas

A call that did reach the chain and was rejected by a contract is a ContractRevertError instead. Check for that first when branching: both are plausible for the same write, but only this one is worth retrying.

Extends

Constructors

Constructor

new RpcError(operation, detail, options?): RpcError

Defined in: packages/sdk/src/errors.ts:200

Parameters

operation

string

What was attempted (e.g. "eth_sendRawTransaction", "watchBook").

detail

string

Why it failed.

options?

ErrorOptions

Standard cause passthrough — the underlying viem/transport error.

Returns

RpcError

Overrides

SomniaMarketsError.constructor

Properties

operation

readonly operation: string

Defined in: packages/sdk/src/errors.ts:201

What was attempted (e.g. "eth_sendRawTransaction", "watchBook").