Skip to content
providerkit
GitHub

TransportError

Defined in: react/src/client.ts:194

What a transport throws to say what became of a command.

refused: the host said no and did nothing, like a 4xx. The client takes the command back: a message leaves the conversation and its text goes back to the person, the buttons of an answer come back, and an observation stops trying unless error.retryable says a later try can work. unknown: anything else, like a 5xx, a dropped connection or a timeout. The host may have acted, so the client never repeats it on its own.

  • Error
new TransportError(
outcome,
error,
options?
): TransportError;

Defined in: react/src/client.ts:199

Parameter Type
outcome "unknown" | "refused"
error DisplayError
options? { cause?: unknown; }
options.cause? unknown

TransportError

Error.constructor
optional cause?: unknown;

Defined in: node_modules/.bun/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Error.cause

readonly error: DisplayError;

Defined in: react/src/client.ts:197

Safe to show: the host wrote it, or the transport did.


message: string;

Defined in: node_modules/.bun/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Error.message

name: string;

Defined in: node_modules/.bun/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1076

Error.name

readonly outcome: "unknown" | "refused";

Defined in: react/src/client.ts:195


optional stack?: string;

Defined in: node_modules/.bun/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack