Skip to content

Commit 9a868de

Browse files
committed
Reenforce that for NonRetryableErrors, users need to manage the error or the Workflow will fail
1 parent 9776d2e commit 9a868de

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/content/docs/workflows/build/sleeping-and-retrying.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ let someState = step.do("call an API", {
8787
}, async () => { /* Step code goes here /* }
8888
```
8989
90-
## Force a Workflow to fail
90+
## Force a Workflow Instance to fail
9191
9292
You can also force a Workflow instance to fail and _not_ retry by throwing a `NonRetryableError` from within the step.
9393
@@ -111,3 +111,5 @@ export class MyWorkflow extends WorkflowEntrypoint<Env, Params> {
111111
```
112112
113113
The Workflow instance itself will fail immediately, no further steps will be invoked, and the Workflow will not be retried.
114+
115+
Users can catch this error if they intend to continue the Workflow execution. Otherwise, the Workflow will fail.

0 commit comments

Comments
 (0)