Why Error Handling Matters
Things go wrong. APIs go down, data comes in unexpected formats, or services hit rate limits. Good error handling means your workflows recover gracefully, you get notified when something needs attention, and critical data doesn’t get lost.Error Handling Strategies
Each node can handle errors differently. Choose based on how critical that step is.Fail Workflow (Default)
The workflow stops immediately and marks the run as failed. When to use:- Critical steps that must succeed (payment processing, data validation)
- Steps where continuing would cause data corruption
- When you need immediate attention to fix the issue
Continue Workflow
The node logs the error but the workflow keeps going. When to use:- Nice-to-have features (sending a courtesy notification)
- Non-critical integrations
- Steps where partial success is acceptable
Error Callback Path
The workflow routes to different nodes when this node fails (using the red error handle). When to use:- Implementing fallback logic
- Retry mechanisms
- Error-specific handling (like trying a backup API)
Configuring Error Handling
- Click on the node to open its configuration
- Find the Error Handling section
- Choose your strategy:
- Fail workflow (default)
- Continue workflow
- Route to error handler (adds red error handle)
Adding Error Callback Paths
When you select “Route to error handler”:- A red handle appears on the right side of the node
- Drag from this handle to create your error path
- Add nodes to handle the error (notifications, fallback logic, etc.)
- Both success and error paths can eventually merge back together
Common Error Handling Patterns
The Notification Pattern
Always notify someone when critical workflows fail:The Retry Pattern
Try an operation multiple times before giving up:The Fallback Pattern
Try a backup option when the primary fails:The Graceful Degradation Pattern
Continue with reduced functionality:Validating Data Early
Prevent errors by validating inputs at the start of your workflow:In a Code Node
Using a Condition Node
Handling External API Errors
Rate Limiting
Timeouts
Set appropriate timeout values and have fallback logic:Authentication Failures
Often means your credentials expired:Check your integration connections regularly. Many expire after 30-90 days and need re-authorization.
Debugging Failed Workflows
1. Check the Run History
- Go to the Runs tab at the bottom of the canvas
- Find the failed run (marked in red)
- Click to open the execution details
2. Identify the Failed Node
The canvas highlights which node failed. Click on it to see:- Input: What data it received
- Error message: What went wrong
- Logs: Any console output (for code nodes)
3. Common Error Types
| Error Type | Meaning |
|---|---|
| Validation Error | Input data didn’t match expected format |
| Connection Error | Couldn’t reach the API or service |
| Timeout Error | Operation took too long |
| Authentication Error | Invalid credentials or expired token |
| Rate Limit Error | Too many requests to the service |
4. Test the Fix
- Make your changes in the draft version
- Use the same input data from the failed run to test
- Verify the fix works before publishing
Preventing Common Errors
Use Structured Outputs
When using agent nodes, define structured output schemas. This guarantees the data format and prevents parsing errors in downstream nodes.Validate Variables Exist
Use optional chaining or defaults:Handle Empty Arrays
Check array length before looping:Testing Error Scenarios
Don’t just test the happy path - test failure scenarios too:- Missing required fields in forms
- Invalid data formats (wrong types, bad emails)
- Empty arrays or null values
- API failures
- Rate limiting scenarios
When to Let It Fail
Not every error needs handling. Sometimes failing fast is the right choice:- Data corruption risk: Better to stop than process corrupt data
- Critical validation: If the data doesn’t meet requirements, don’t continue
- Unrecoverable errors: Some errors can’t be fixed by the workflow