Error Handling Templates
Zapier Error Recovery
// Add this as a Code by Zapier step
const handleAutomationError = (error, context) => {
const fallbackResponses = {
calendar_conflict: "That time isn't available. Should I find another slot?",
email_bounce: "That email might be incorrect. Can you spell it for me?",
sms_failed: "Text delivery failed. Should I try email instead?",
crm_duplicate: "I found your existing record. Updating your information.",
api_timeout: "Taking a bit longer than expected. One moment please."
};
return {
dialora_response: fallbackResponses[error.type] ||
"I'm having a technical issue. Can I call you back in 5 minutes?",
retry_action: error.retryable || false,
log_error: true
};
};Make.com Error Handler Module
{
"error_handler": {
"timeout": {
"max_wait": 5000,
"fallback_message": "Still working on that..."
},
"validation": {
"email": "regex:^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"phone": "regex:^[+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$",
"date": "future_date_only"
},
"retry_policy": {
"max_attempts": 3,
"backoff": "exponential"
}
}
}