docs: added troubleshooting guides + improvements (#11927)
* docs: added troubleshooting guides + improvements * build fixes
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
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)
|
||||
@@ -0,0 +1,9 @@
|
||||
import StepXDefined from "../../_sections/workflows/step-x-defined.mdx"
|
||||
|
||||
export const metadata = {
|
||||
title: `Step X is already defined in workflow Error`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
<StepXDefined />
|
||||
@@ -0,0 +1,49 @@
|
||||
export const metadata = {
|
||||
title: `Handler for action X Not Found Workflow Error`,
|
||||
}
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
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...
|
||||
```
|
||||
|
||||
## Why this Error Occured
|
||||
|
||||
This error occurs if the `when-then` block doesn't return a step's result and doesn't have a name specified.
|
||||
|
||||
For example:
|
||||
|
||||
```ts
|
||||
when(input, (input) => !input.is_active)
|
||||
.then(() => {
|
||||
console.log("not returning anything")
|
||||
})
|
||||
```
|
||||
|
||||
The above `when-then` block doesn't return a step's result, which causes the error.
|
||||
|
||||
---
|
||||
|
||||
## How to Fix it
|
||||
|
||||
You can resolve this error by passing a name as a first parameter of `when`:
|
||||
|
||||
```ts
|
||||
const result = when(
|
||||
"custom-when-condition",
|
||||
input,
|
||||
(input) => !input.is_active
|
||||
)
|
||||
.then(() => {
|
||||
console.log("not returning anything")
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [When-Then documentation](!docs!/learn/fundamentals/workflows/conditions#specify-name-for-when-then)
|
||||
Reference in New Issue
Block a user