Raise custom error messages
Acme Events processes campaign requests with a budget field. Invalid data like negative or missing budgets can break automations and corrupt Acme's CRM.
In this exercise, you'll validate the budget field to catch bad data early. After the Code node, add an If node to check if budget is less than 0 OR empty. Route invalid records (false branch) to a Stop and Error node with a custom message, ensuring the workflow halts when budgets don't meet Acme's criteria.
Cet exercice fait partie du cours
Introduction to Workflow Automation with n8n
Exercice interactif pratique
Passez de la théorie à la pratique avec l’un de nos exercices interactifs
Commencer l’exercice