n8n-nodes-error-check-node
v0.1.0
Published
The Error Check Node for n8n is designed to detect errors in previous workflow nodes and handle them according to specified strategies. It allows you to classify errors, log them with custom messages, and define whether to stop, skip, or retry the workflo
Downloads
78
Maintainers
Keywords
Readme
Error Check Node for n8n
The Error Check Node for n8n is designed to check for errors in the workflow and handle them accordingly. It provides flexibility in defining how errors should be handled, including options to stop the workflow, continue the workflow, or log errors for further inspection.
This node helps streamline error handling in your workflows, ensuring that errors are managed consistently and efficiently.
Features:
- Error Detection: Automatically detects errors in the workflow.
- Error Type Classification: Select the type of error (Connection, Data, Logic).
- Custom Error Message: Provide a custom error message to be logged or displayed.
- Error Handling Strategy: Choose between retrying, skipping, or stopping the workflow when an error is detected.
- Logging: Log the error with customizable logging levels and specify the storage location for logs (file, database, or external service).
- Notification: Optionally send notifications for error occurrences.
Installation
To install and configure this custom node, follow these steps:
- Clone or download the repository.
- Follow the official n8n custom node installation guide.
- Ensure your n8n instance is configured to support the necessary dependencies for logging and error handling.
Node Configuration
Available Parameters:
The Error Check Node provides the following configuration options:
Error Message Target:
- UI: Display the error in the user interface.
- Dev: Send the error message to the developer's environment.
- Backend: Send the error details to the backend for processing.
Default:
ui
On Error:
- Stop Workflow: Stops the workflow execution when an error is detected.
- Continue Workflow: Continues the workflow even if an error is encountered.
Default:
stop
Error Type:
- Connection Error: Errors related to network or database connection.
- Data Error: Issues with the data processing or format.
- Logic Error: Problems in the business logic or workflow design.
Default:
data
Custom Error Message:
- Enter a custom message to describe the error, which will be logged or displayed.
Default:
""
(Empty)Log Level:
- Info: Log general information about the workflow.
- Warning: Log potential issues that need attention.
- Error: Log errors that stop the workflow or need immediate attention.
Default:
error
Storage Location:
- Local File: Store logs in a local file.
- Database: Store logs in a database.
- External Service: Use an external service for logging (e.g., an API or cloud service).
Default:
file
Error Handling Strategy:
- Retry: Retry the workflow step if an error occurs.
- Skip: Skip the workflow step and continue.
- Stop Workflow: Stop the workflow completely when an error occurs.
Default:
stop
Example Workflow
Input Data:
{
"errorMessageTarget": "dev",
"onError": "stop",
"errorType": "data",
"customErrorMessage": "Custom error message to describe the issue.",
"logLevel": "warning",
"storageLocation": "file",
"errorHandlingStrategy": "retry"
}
- Node Configuration:
- Error Message Target: dev
- On Error: stop
- Error Type: data
- Custom Error Message: Custom error message to describe the issue.
- Log Level: warning
- Storage Location: file
- Error Handling Strategy: retry
Output Data (Example):
If the workflow encounters an error, the output may look like this:
{
"errorInfo": {
"message": "Error detected in node: ErrorCheckNode",
"errorType": "dev",
"details": "Custom error message to describe the issue."
},
"log": {
"level": "warning",
"message": "Workflow encountered a data error",
"storage": "Stored in file"
},
"notification": "Error details sent to the developer."
}
In this example:
- errorInfo: Contains details about the error, including the message, type, and additional details.
- log: Logs the error with the defined log level and storage location.
- notification: Specifies that a notification has been sent (if configured).