Stop and Error Node

Halt workflow execution and return an error message.

Written By pvdyck

Last updated 17 minutes ago

Stop and Error Node

The Stop and Error node terminates the workflow and returns a custom error. Use it to enforce business rules or validate conditions.

Parameters

ParameterDescription
Error TypeChoose between Error Message or Error Object

Error Message Mode

ParameterDescription
Error MessageA custom text string describing the error (supports expressions, e.g., Missing field: {{ $json.fieldName }})

Error Object Mode

ParameterDescription
Error ObjectA JSON object with structured error details. Useful for returning machine-readable error data

Use Cases

  • Input validation: After an If node, route invalid items to Stop and Error with a descriptive message
  • Business rules: Halt execution when a required condition is not met (e.g., "Budget exceeded")
  • Fail-fast patterns: Detect problems early and stop with context rather than letting bad data propagate

Tips

  • Use expressions in the error message to include dynamic context: "Order {{ $json.orderId }} missing required field: email"
  • Place after Filter or If nodes to catch edge cases explicitly
  • The error appears in the workflow execution log for debugging

Limitations

  • None. Full support.

Related