workflow/errors
API reference for the error classes exported from the workflow/errors package.
All errors extend WorkflowError, so you can catch any SDK error with a single instanceof check, or narrow to a specific class for fine-grained handling.
Base classes
WorkflowError
Base class for all workflow error types.
WorkflowWorldError
Base error for failures from workflow storage backends.
Registration errors
WorkflowNotRegisteredError
Thrown when a workflow function is not registered in the current deployment.
StepNotRegisteredError
Thrown when a step function is not registered in the current deployment.
Run errors
WorkflowRunNotFoundError
Thrown when operating on a workflow run that does not exist.
WorkflowRunFailedError
Thrown when awaiting the return value of a failed workflow run.
WorkflowRunCancelledError
Thrown when awaiting the return value of a canceled workflow run.
WorkflowRunNotCompletedError
Thrown when requesting the result of a workflow run that has not completed yet.
WorkflowRuntimeError
Thrown when the workflow runtime encounters an execution error, such as serialization failures or timeouts.
WorkflowStartError
Thrown when start({ experimental_hook }) cannot confirm whether its run was queued or admitted.
RunExpiredError
Thrown when a workflow run has expired and can no longer be operated on.
RunNotSupportedError
Thrown when a workflow run requires a newer workflow spec version than the installed SDK supports.
Hook errors
HookNotFoundError
Thrown when resuming a hook that does not exist.
HookConflictError
Thrown when creating a hook with a token that is already in use by another workflow run.
HookForceClaimedError
Thrown to a hook's awaiters when another run takes its token over with experimental_force.
Backend errors
ThrottleError
Thrown when a request is rate-limited by the workflow backend.
EntityConflictError
Thrown when a storage operation conflicts with the current entity state.
PreconditionFailedError
Thrown when an event creation is rejected because the client's event-log snapshot is stale.
InBandSupersededError
Thrown on the experimental spec 9 runtime when a World refuses an in-band write from a superseded orchestrator invocation.
TooEarlyError
Thrown when a request is made before the system is ready to process it.