StepNotRegisteredError
Thrown when a step function is not registered in the current deployment.
StepNotRegisteredError is thrown when the runtime tries to execute a step function that is not registered in the current deployment. This is an infrastructure error — not a user code error. It typically indicates a build or bundling issue that caused the step to not be included in the deployment.
When this error occurs, the step fails (like a FatalError) and control is passed back to the workflow function, which can handle the failure gracefully.
import { StepNotRegisteredError } from "workflow/errors"
declare const error: unknown; // @setup
if (StepNotRegisteredError.is(error)) {
console.error("Step not registered:", error.stepName);
}API Signature
Properties
| Name | Type | Description |
|---|---|---|
stepName | string | The name of the step function that was not found. |
message | string | The error message. |
Static Methods
StepNotRegisteredError.is(value)
Type-safe check for StepNotRegisteredError 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, hooks). Inside "use workflow" functions, step errors arrive deserialized from the event log and won't be actual StepNotRegisteredError instances — use error.message matching instead. See the troubleshooting page for workflow-side error handling examples.
import { StepNotRegisteredError } from "workflow/errors"
declare const error: unknown; // @setup
if (StepNotRegisteredError.is(error)) {
// error is typed as StepNotRegisteredError
}