WorkflowNotRegisteredError

Thrown when a workflow function is not registered in the current deployment.

WorkflowNotRegisteredError is thrown when the runtime tries to execute a workflow function that is not registered in the current deployment. This is an infrastructure error — not a user code error. It typically means a run was started against a deployment that does not have this workflow (e.g., the workflow was renamed or moved), or there was a build/bundling issue.

When this error occurs, the run fails with a RUNTIME_ERROR error code.

import { WorkflowNotRegisteredError } from "workflow/errors"
declare const error: unknown; // @setup

if (WorkflowNotRegisteredError.is(error)) {
  console.error("Workflow not registered:", error.workflowName);
}

API Signature

Properties

NameTypeDescription
workflowNamestringThe name of the workflow function that was not found.
messagestringThe error message.

Static Methods

WorkflowNotRegisteredError.is(value)

Type-safe check for WorkflowNotRegisteredError instances. Preferred over instanceof because it works across module boundaries and VM contexts.

The .is() method works in server-side Node.js code (API routes, middleware). When checking the error from run.returnValue, use WorkflowRunFailedError.is() and inspect error.cause — the underlying error is deserialized from the event log.

import { WorkflowNotRegisteredError } from "workflow/errors"
declare const error: unknown; // @setup

if (WorkflowNotRegisteredError.is(error)) {
  // error is typed as WorkflowNotRegisteredError
}