export declare class EventualError extends Error { constructor(name: string, message?: string); /** * Provides a reasonable form when running JSON.stringify. */ toJSON(): { message?: string | undefined; name: string; }; } export declare class SystemError extends EventualError { constructor(name?: string, message?: string); } export declare class DeterminismError extends SystemError { constructor(message?: string); } /** * Thrown from within a workflow when any set timeout expires. * * ```ts * const myTask = new task("myTask", {timeout: duration(100, "seconds") }, async () => { ... }); * workflow("myWorkflow", async () => { * try { * await myTask(); * return "task did not time out!"; * } catch (err) { * if(err instanceof Timeout) { * return "task timed out!"; * } * throw err; * } * }) * ``` */ export declare class Timeout extends EventualError { constructor(message?: string); } /** * Thrown when a task fails to send heartbeats. * * ```ts * const myTask = new task("myTask", {heartbeatSeconds: 10}, async () => { ... }); * workflow("myWorkflow", async () => { * try { * await myTask(); * return "task completed successfully!"; * } catch (err) { * if(err instanceof HeartbeatTimeout) { * return "task did not send heartbeats!"; * } * throw err; * } * }) * ``` */ export declare class HeartbeatTimeout extends Timeout { constructor(message?: string); } /** * Thrown when the workflow times out. * * After a workflow times out, events are no longer accepted * and commands are no longer executed. */ export declare class WorkflowTimeout extends SystemError { constructor(message?: string); } /** * Thrown when a task id is not found in the service. */ export declare class TaskNotFoundError extends Error { constructor(taskName: string, availableNames: string[]); } export declare class ExecutionAlreadyExists extends Error { constructor(name: string, workflowName: string); } /** * Thrown from the {@link Entity} set or delete when the expected version is incorrect. */ export declare class UnexpectedVersion extends Error { constructor(message: string); } /** * Thrown from {@link Entity.transactWrite} when an error is encountered * that cancels the transaction. * * Returns reasons in the same order as the input items. */ export declare class TransactionCancelled extends EventualError { reasons: (UnexpectedVersion | undefined)[]; constructor(reasons: (UnexpectedVersion | undefined)[]); } /** * Thrown when a transaction conflict with another conflict or write operation. */ export declare class TransactionConflict extends EventualError { constructor(); } //# sourceMappingURL=error.d.ts.map