VamimiOpen VamimiAI

Automation documentation

n8n Error Handling: Catch Every Failure Before a Client Does

Retry On Fail, error outputs, Continue, error workflows and the Error Trigger in n8n, what each one does and which to use for steps that call outside services.

By VamimiAI team · · 5 min read

n8n gives you three places to handle a failure: on the node (Retry On Fail and the On Error setting), in the workflow (an error output route), and for the whole workflow (an error workflow that starts with an Error Trigger). A production workflow you hand to a client should use all three: retries for passing problems, an error path for failures you can handle, and an error workflow so that anything else at least tells someone.

What happens by default

When a node fails and you changed nothing, the run stops at that node. The execution is marked as failed in the Executions list, the remaining nodes never run, and unless the workflow has an error workflow set, nobody is notified. For a workflow that runs on a schedule or a webhook, that means a failure is silent until someone goes looking.

The nodes most likely to fail are the ones that call another service: HTTP Request, any app node (HubSpot, Slack, Google Sheets, Airtable...), and AI nodes. They fail when the service is down, when you hit a rate limit, or when a login expires.

On the node: Retry On Fail

In a node's Settings, turn on Retry On Fail and set Max Tries and Wait Between Tries. This handles passing problems such as a timeout or a rate limit without any extra nodes.

Use it on every node that calls an outside service, with a wait long enough for a rate limit to reset. It does not help with a failure that will happen every time, such as a deleted record or a revoked login: those need a path or an alert.

On the node: the On Error setting

The same Settings tab has On Error, with three choices:

SettingWhat happens when the node failsUse it when
Stop WorkflowThe run stops here (the default)A failure must not be hidden
ContinueThe run goes on, with the error passed along as dataThe next steps can cope with missing data
Continue (using error output)The node gets a second, error output you connect like any other pathYou want to handle the failure: alert, log, retry later

Continue is the risky one: later nodes receive an error item instead of the data they expect, and the run can finish "successfully" having done the wrong thing. If you use it, check for the error in the next node.

Continue (using error output) is the clearest. The failure becomes a visible path on the canvas, and on a diagram, so you can send it somewhere deliberate: a Slack message to ops, a row in a "failed leads" sheet, or a queue to try again later.

For the whole workflow: an error workflow

Create a separate workflow that starts with an Error Trigger node, and send yourself or the client an alert from it (Slack, email, a ticket). Then, in each production workflow, open Workflow settings and choose it under Error Workflow.

When a run fails, the error workflow receives the workflow name, the failed execution and the error message, so the alert can link straight to the failed run. One shared error workflow for all of a client's workflows is usually enough.

Two things catch people out:

  • The error workflow runs for failed automatic runs (triggered by the schedule, a webhook or an app event), not when you click to test the workflow in the editor. Test it with a real trigger, or force a failure with a Stop and Error node.
  • The setting is per workflow. A new workflow, or a copy, has no error workflow until you set one.

Still not firing? Six causes of an n8n error workflow not triggering, and how to test it.

Which to use where

A simple rule for client work:

  1. Every node that calls an outside service gets Retry On Fail.
  2. Every failure the business cares about (a lost lead, an unpaid invoice) gets an error output to a deliberate place.
  3. Every production workflow gets the client's error workflow.
  4. Use Continue only when the next step checks for the error.

See every failure path at once

The hard part is not the settings, it is knowing which nodes still have no protection. Importing the workflow into VamimiAI's n8n workflow diagram draws the error outputs dashed, and gives every outside-service node with no retry and no error path a red end that says what really happens: the run stops, and whether anyone is told. The checks on import also flag a missing error workflow and errors passed on as data with Continue.

When everything is covered, the handover document puts the diagram and a table of what happens when each step fails in front of your client. The n8n documentation checklist covers the rest of the handover.

Questions

Why is my n8n error workflow not running?

Check that the failing workflow has it selected under Error Workflow in its own settings, that the error workflow starts with an Error Trigger node, and that the failure happened in an automatic run: testing a workflow by hand in the editor does not start the error workflow.

What is the difference between Continue and Continue (using error output)?

Continue passes the error along as data on the normal path, so later nodes must check for it. Continue (using error output) gives the node a separate error output, so the failure gets its own visible path.

Should every node retry on fail?

Every node that calls an outside service should, with a wait long enough for rate limits. Retrying does not fix failures that will happen every time, such as a revoked login, so those still need an error path or an alert.

Tools for this