Errors
Errors
Classes
- T3Error
Base class for library failures with stable error codes.
- T3StorageError
Local profile configuration or credential backend I/O failed.
- T3HttpError
A non-2xx HTTP response that is not one of the more specific classes below.
- T3AuthError
401 (auth_invalid) or 403 (insufficient_scope), from HTTP or detected locally.
- T3NotFoundError
A missing resource from HTTP or exact local profile resolution;
reasonnames what was missing.- T3RpcError
The server answered an RPC with a tagged failure (
Exit→Fail).- T3RpcDefectError
The server died while handling an RPC (
Exit→Die), often a payload decode failure.- T3ConnectionError
The socket is not usable: it failed to open, closed, timed out, or spoke garbage.
- T3DecodeError
A server payload did not match the schema this library expects.
- T3PreconditionError
The caller asked for something this client can tell is wrong before talking to the server.
- T3InterruptedError
A call or stream was cancelled by the caller (abort signal or early return).
- T3TimeoutError
A caller-selected wait exceeded its time bound.
Constants
- RpcErrorRecord
Every tagged failure a registered RPC method declares. A failure with an unrecognised
_tagdecodes as{ unknown: true, raw }. UsedecodeRpcErrorRecordto decode without ever failing.
Functions
- isT3Error()
Test whether a value belongs to the library error hierarchy.
export function isT3Error(value: unknown): value is T3Error;- isRpcErrorOfTag()
Narrow a decoded RPC failure to a recognized tagged error.
export function isRpcErrorOfTag<const Tag extends RpcErrorTag>( record: RpcErrorRecord, tag: Tag, ): record is RpcErrorOfTag<Tag>;
T3Error
Base class for library failures with stable error codes.
T3StorageError
Local profile configuration or credential backend I/O failed.
T3HttpError
A non-2xx HTTP response that is not one of the more specific classes below.
T3AuthError
401 (auth_invalid) or 403 (insufficient_scope), from HTTP or detected locally.
T3AuthError.insufficientScope()
A scope check that failed before any request was sent.
static insufficientScope(requiredScope: string, context: string): T3AuthError;
Kind: static method of T3AuthError
T3NotFoundError
A missing resource from HTTP or exact local profile resolution; reason names what was missing.
T3RpcError
The server answered an RPC with a tagged failure (Exit → Fail).
Kind: global class
t3RpcError.tag
The server error’s _tag, for example OrchestrationDispatchCommandError.
Kind: instance property of T3RpcError
t3RpcError.detail
The whole error record as received, with credential-shaped values redacted.
Kind: instance property of T3RpcError
t3RpcError.record
The error record decoded against the method’s declared error schemas.
{ unknown: true, raw } when the tag is not recognised or its fields do
not match. Narrow it with is.
Kind: instance property of T3RpcError
t3RpcError.is()
true when the failure is a recognised tag whose fields matched its schema.
is<const Tag extends RpcErrorTag>(
tag: Tag,
): this is T3RpcError & { readonly record: RpcErrorOfTag<Tag> };
Kind: instance method of T3RpcError
T3RpcDefectError
The server died while handling an RPC (Exit → Die), often a payload decode failure.
T3ConnectionError
The socket is not usable: it failed to open, closed, timed out, or spoke garbage.
T3DecodeError
A server payload did not match the schema this library expects.
Kind: global class
t3DecodeError.source
Where the payload came from, for example orchestration.subscribeThread or GET /api/orchestration/shell.
Kind: instance property of T3DecodeError
t3DecodeError.raw
The payload that failed to decode, with credential-shaped values redacted.
Kind: instance property of T3DecodeError
T3PreconditionError
The caller asked for something this client can tell is wrong before talking to the server.
T3InterruptedError
A call or stream was cancelled by the caller (abort signal or early return).
T3TimeoutError
A caller-selected wait exceeded its time bound.
RpcErrorRecord
Every tagged failure a registered RPC method declares. A failure with an
unrecognised _tag decodes as { unknown: true, raw }. Use
decodeRpcErrorRecord to decode without ever failing.
isT3Error()
Test whether a value belongs to the library error hierarchy.
export function isT3Error(value: unknown): value is T3Error;
isRpcErrorOfTag()
Narrow a decoded RPC failure to a recognized tagged error.
export function isRpcErrorOfTag<const Tag extends RpcErrorTag>(
record: RpcErrorRecord,
tag: Tag,
): record is RpcErrorOfTag<Tag>;
Kind: global function