docs: document when-then name
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export const metadata = {
|
||||
title: `Workflow Errors`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
## When-Then Error: Handler for action X Not Found
|
||||
|
||||
The following error may occur in production if you use a `when-then` block in your workflow:
|
||||
|
||||
```plain
|
||||
custom-workflow:when-then-01JE8Z0M1FXSE2NCK1G04S0RR2:invoke - Handler for action \"when-then-01JE8Z0M1FXSE2NCK1G04S0RR2\" not found...
|
||||
```
|
||||
|
||||
This occurs if the `when-then` block doesn't return a step's result and doesn't have a name specified. You can resolve it by passing a name as a first parameter of `when`:
|
||||
|
||||
```ts
|
||||
const result = when(
|
||||
"custom-when-condition",
|
||||
// ... rest of the parameters
|
||||
)
|
||||
```
|
||||
|
||||
Learn more about passing a name for `when-then` in [this documentation](!docs!/learn/fundamentals/workflows/conditions#specify-name-for-when-then)
|
||||
Reference in New Issue
Block a user