The Error Handler node catches errors from any node in the workflow. When present, it runs automatically when any node fails. No incoming connections are needed—it is triggered by the workflow engine.
Overview
| Property | Value |
|---|---|
| Inputs | 0 (triggered on error) |
| Outputs | 1 |
| Output | $nodeLabel.error, $nodeLabel.errorNode, $nodeLabel.errorNodeType, $nodeLabel.timestamp |
Parameters
| Parameter | Type | Description |
|---|---|---|
label | string | Node identifier (camelCase) |
message | expression | Optional. Default: $error.message |
Error Context
When the error handler runs, these fields are available:
| Field | Description |
|---|---|
$errorHandler.error | Error message string |
$errorHandler.errorNode | Label of the node that failed |
$errorHandler.errorNodeType | Type of the failed node |
$errorHandler.timestamp | When the error occurred |
Use Cases
- Send Telegram, Slack, or Send Email notifications on failure
- Log errors to external systems
- Return a custom error response via Output
Only one Error Handler per workflow.
Example
{
"type": "errorHandler",
"data": {
"label": "catchErrors"
}
}Connect to Output for custom error response:
{"message": "Error: $errorHandler.error at $errorHandler.errorNode"}Or connect to Slack for notifications:
{"message": "Workflow failed: $errorHandler.error in $errorHandler.errorNode"}Related
- Node Types – Overview of all node types
- Telegram Node – Notify on error
- Slack Node – Notify on error
- Send Email Node – Email alerts
- Throw Error Node – Intentional errors