Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/workflow / errors

errors

Typed error surface for @graphorin/workflow. Every workflow-level failure lands as a subclass of WorkflowError carrying the stable string code discriminator so consumers can pattern-match without inspecting messages.

Classes

ClassDescription
CheckpointNotFoundErrorThrown when Workflow.fork cannot find the named checkpoint.
ConcurrentResumeErrorThrown when a second concurrent resume is attempted for the same thread.
InvalidChannelWriteErrorThrown when a node writes a key not declared in stateSchema.
InvalidWorkflowConfigErrorThrown by createWorkflow on configuration validation failure.
MultiWriteErrorThrown when more than one writer in a single execution step writes a LatestValue.
NodeExecutionErrorThrown when a node throws and the failure is propagated through the engine.
ReducerErrorThrown when a Reducer channel's reduce(...) callback throws.
ResumeWithoutSuspensionErrorThrown by Workflow.resume when the named thread is not in a suspended state.
ThreadNotFoundErrorThrown when Workflow.resume cannot find the named thread.
UnknownNodeErrorThrown by createWorkflow when an edge references a node that is not registered.
WorkflowAbortedErrorThrown when a workflow run is cancelled via AbortSignal.
WorkflowErrorBase error class for all @graphorin/workflow failures.

Type Aliases

Type AliasDescription
WorkflowErrorCodeStable code discriminator on every WorkflowError subclass. Treat as a string literal union for switch (err.code) style code.