Docs
Sign in

Throw Error

Throw Error stops the flow on purpose with an error you define.

Screenshot to add: The Throw Error settings panel with Error type, Error message and the context switch.

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

FieldWhat it doesNotes
Error typeThe name of the errorDefault WorkflowError. Placeholder ValidationError
Error messageThe text of the errorA Jinja2 template
Include execution context in errorAdds details of the run to the errorA 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.