Skip to content

Throw Error ​

The Throw Error node intentionally terminates the workflow with a specified error message. It is used to force a failure state based on conditional logic or validation results.

Purpose ​

Use this node to:

✅ Deliberately throw an error when a validation or business rule fails.
✅ Terminate workflows with a meaningful error message for user feedback or debugging.
✅ Integrate conditional branches that end execution when criteria are not met.

Inputs ​

Field LabelInput TypeDescription
Error MessageTextThe error message to return when throwing the error. If not provided, defaults to "Task ended with no message from the user".

Outputs ​

This node does not produce outputs, as it intentionally sets the workflow state to fail.

Functionality ​

This node:

  1. Validates input to check for an optional Error Message.
  2. Sets the task status to fail.
  3. Returns the error message specified by the user or a default message if none is provided.

Example Use Case ​

✅ End a workflow with "Invalid purchase order status" if validation fails.
✅ Stop execution when required preconditions are not met, such as missing external system data.
✅ Force an error for test scenarios in QA pipelines.

Task Success Criteria ​

  • Always fails intentionally with taskSuccess set to false and statusReturn set to Fail.

Notes ​

  • This node is designed for controlled workflow termination and should be used within error-handling branches or validation sequences.
  • Ensure the Error Message is clear and user-friendly if exposed in UI or logs.

Tentech 2024