@somnia-chain/markets-sdk / index / RpcError
Class: RpcError
Defined in: packages/sdk/src/errors.ts:222
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:232
Creates an RPC error with operation context and an optional cause.
Details
operation: What was attempted (e.g."eth_sendRawTransaction","watchBook").detail: Why it failed.options: Standardcausepassthrough — the underlying viem/transport error.
Parameters
operation
string
detail
string
options?
ErrorOptions
Returns
RpcError
Overrides
SomniaMarketsError.constructor
Properties
operation
readonlyoperation:string
Defined in: packages/sdk/src/errors.ts:233