Are you an LLM? You can read better optimized documentation at /documentation/api/client/type-aliases/TypedRpcError.md for this page in Markdown format
ws-asyncapi API / client / TypedRpcError
Type Alias: TypedRpcError<Errors>
TypedRpcError<
Errors> ={ [C in keyof Errors]: { code: C; message: string; data: Errors[C] } }[keyofErrors] | {code:BuiltinErrorCode;message:string;data:unknown; }
Defined in: .api-entries/client/index.d.ts:226
A typed RPC error: either one of the codes declared in the contract (with its data payload typed), or a built-in runtime code (data is unknown). The codes are kept as distinct literals so if (error.code === "X") narrows to the typed data for that code. (Undeclared custom codes still arrive at runtime — reach them via request() + catch on the open-coded RpcError.)
Type Parameters
Errors
Errors