Why Error Handling Matters
Things go wrong. APIs go down, data comes in unexpected formats, or services hit rate limits. The question isn’t if your workflow will encounter errors - it’s how it handles them. Good error handling means:- Your workflows recover gracefully instead of failing silently
- You get notified when something needs attention
- Critical data doesn’t get lost
- Your team knows what went wrong and where
Error Handling Strategies
Each node in your workflow can handle errors differently. Choose the right strategy 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
Use this sparingly. Make sure you’re actually monitoring logs, or failed steps
might go unnoticed.
Error Callback Path
The workflow routes to a different set of 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
To set up error handling for a node:- 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:Set a maximum retry count to avoid infinite loops. Use a condition node to
track retry attempts.
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
APIs can fail in different ways. Here’s how to handle common scenarios:Rate Limiting
When an API responds with a rate limit error: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
When a workflow fails, here’s how to investigate: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 will highlight 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. Check the Error Details
Common error types and what they mean:- 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
Error Monitoring Best Practices
Set Up Alerts
Configure notifications for critical workflow failures:- Go to workflow settings
- Add notification recipients
- Choose notification conditions (all failures, or just critical ones)
Review Error Logs Regularly
Check your workflow runs weekly:- Are certain nodes failing often?
- Are errors happening at specific times?
- Do errors correlate with external events?
Document Known Issues
Add comments to nodes that have known quirks:Create Error Dashboards
For production workflows, track:- Success rate over time
- Most common error types
- Average recovery time
- Cost of failed runs
Preventing Common Errors
Use Structured Outputs
When using agent nodes, always define structured output schemas. This guarantees the data format and prevents parsing errors in downstream nodes.Validate Variables Exist
Before using a variable, check it exists:Handle Empty Arrays
Check array length before looping:Set Timeouts
Always set reasonable timeouts for external calls:- HTTP requests: 30 seconds
- AI agent calls: 60 seconds
- Complex computations: Based on expected duration + buffer
Testing Error Scenarios
Don’t just test the happy path - test failure scenarios too:What to Test
- Missing required fields in forms
- Invalid data formats (wrong types, bad emails, etc.)
- Empty arrays or null values
- API failures (use a test endpoint that returns errors)
- Rate limiting scenarios
- Large data volumes
How to Test
- Create a test run with intentionally bad data
- Verify your error handlers activate
- Check that notifications are sent
- Ensure no data is corrupted
When to Let It Fail
Not every error needs handling. Sometimes failing fast is the right choice:- Data corruption: 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