Thrown when operating on a workflow run that does not exist.
WorkflowRunNotFoundError is thrown when performing operations on a workflow run that does not exist. This includes calling methods like run.status, run.cancel(), or awaiting run.returnValue on a run whose ID does not match any known workflow run.
Note that getRun(id) itself is synchronous and will not throw — the error is raised when subsequent operations on the run object discover the run is missing.
import { WorkflowRunNotFoundError } from "workflow/errors"
declare const run: { status: Promise<string>; returnValue: Promise<any> }; // @setup
try {
const status = await run.status;
} catch (error) {
if (WorkflowRunNotFoundError.is(error)) {
console.error(`Run ${error.runId} does not exist`);
}
}Properties
| Name | Type | Description |
|---|---|---|
runId | string | The ID of the run that was not found. |
message | string | The error message. |
Static Methods
WorkflowRunNotFoundError.is(value)
Type-safe check for WorkflowRunNotFoundError instances. Preferred over instanceof because it works across module boundaries and VM contexts.
import { WorkflowRunNotFoundError } from "workflow/errors"
declare const error: unknown; // @setup
if (WorkflowRunNotFoundError.is(error)) {
// error is typed as WorkflowRunNotFoundError
}










