Skip to main content

Throw

Controlled node

Overview​

Stop the workflow run with a custom error message.

Throw deliberately fails the current workflow run with an error message. Use it when continuing would be unsafe or a required condition has not been met.

To handle a problem and continue along another path instead, use If or Assert.

Inputs​

InputTypeDescription
runEventRaises the error and stops the run.
messageTextA clear explanation of the failure. If empty or omitted, the message is An error occurred.

Outputs​

This node has no output sockets. There is no done path after the error.

Example​

  1. Use Compare and If to check that a required numeric value is within its allowed range.
  2. Connect If's false event to Throw's run input.
  3. Set message to The requested quantity must be greater than zero.
  4. Connect If's true event to the normal processing path.

Check the workflow's logs to investigate failed runs.

Throw does not roll back earlier actions. Records already written, files created or messages sent remain, so validate before performing those actions where possible. Avoid putting secrets or sensitive record contents into error messages.