tryError Documentation
Interface: TryError\<T\>
Interface
Defined in: [types.ts:10](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/types.ts#L10) Core error type with rich context for debugging and error handling
tryError API Documentation v0.0.1-alpha.1
tryError API Documentation / TryError
Interface: TryError<T>
Defined in: types.ts:10
Core error type with rich context for debugging and error handling
Extended by
Type Parameters
T
T
extends string
= string
Properties
cause?
readonly optional cause: unknown;
Defined in: types.ts:50
The original error or thrown value that caused this error
context?
readonly optional context: Record<string, unknown>;
Defined in: types.ts:45
Additional context data for debugging
message
readonly message: string;
Defined in: types.ts:25
Human-readable error message
source
readonly source: string;
Defined in: types.ts:35
Source location where the error occurred (file:line:column)
stack?
readonly optional stack: string;
Defined in: types.ts:30
Stack trace if available (may be stripped in production)
timestamp
readonly timestamp: number;
Defined in: types.ts:40
Timestamp when the error was created
type
readonly type: T;
Defined in: types.ts:20
The type of error - used for discriminated unions