Throw Error
Throw Error stops the flow on purpose with an error you define.
Screenshot placeholder
When to use it
Use it at the end of a path that should never be reached, or to report a problem in clear words. The palette describes it as "Throw explicit error". A Try / Catch node can handle the error.
Settings
| Field | What it does | Notes |
|---|---|---|
| Error type | The name of the error | Default WorkflowError. Placeholder ValidationError |
| Error message | The text of the error | A Jinja2 template |
| Include execution context in error | Adds details of the run to the error | A switch. On by default |
Inputs and outputs
- One input at the top.
- No output. The node has no output connection because it ends the flow.
Example
Illustrative. After a Condition finds a missing order number, connect the path for a missing number to Throw Error with Error type ValidationError and Error message "Order number is missing".
Tips
- Pick a specific Error type. It makes problems easier to find.
- Keep Include execution context in error on while building. It gives you more to work with.