Tips > Reliability & Performance

Use Continue on Fail for Graceful Degradation

When processing a batch of items, one failure should not stop the entire batch.

Continue on Fail lets a node keep processing the rest of a batch when one item errors, instead of stopping the whole workflow. The failing item passes through with an error field attached, so you can split successes from failures downstream and handle each group separately. Use it for expected, item-level failures such as a 404 on one record among many.

What does Continue on Fail do in n8n?

When processing a batch of items, one failure should not stop the entire batch. Enable Continue on Fail on nodes where individual item failures are acceptable. The workflow continues processing remaining items, and you can handle the failed items separately.

Real-world example: A workflow enriches 200 leads by calling a company data API for each one. 5 of the 200 companies are not found (404 error). Without Continue on Fail, the workflow stops at the first 404 and the remaining 195 leads are never processed.

# Node Settings on the "Enrich Company Data" HTTP Request node

Settings:
  Continue On Fail: true
  # When a single item fails, the node outputs the error

  # as part of the item data instead of stopping the workflow

How do you handle the failed items?

The output of a node with Continue on Fail includes error information:

// Successful item output
{
  "lead_id": "L001",
  "company": "Acme Corp",
  "enriched_data": {
    "industry": "Technology",
    "employees": 500,
    "revenue": "$50M"
  }
}

// Failed item output (Continue on Fail adds error fields)
{
  "lead_id": "L002",
  "company": "Unknown LLC",
  "error": {
    "message": "Request failed with status code 404",
    "description": "Company not found"
  }
}

Separate successful and failed items downstream:

// Code node: "Split Successes and Failures"
const items = $input.all();

const successes = [];
const failures = [];

for (const item of items) {
  if (item.json.error) {
    failures.push({
      json: {
        ...item.json,
        failedAt: new Date().toISOString(),
        retryable: item.json.error.message?.includes('429')
          || item.json.error.message?.includes('500')
      }
    });
  } else {
    successes.push(item);
  }
}

// Output 0: successes, Output 1: failures
// Use this node's "Output" setting to split into two outputs
return [successes, failures];

When should you use Continue on Fail versus an error workflow?

Note: Continue on Fail vs. Error Workflow These serve different purposes. Continue on Fail handles expected, item-level failures within a running workflow. Error Workflow handles unexpected, workflow-level crashes. Use both together: Continue on Fail for batch processing, Error Workflow as the safety net.

This pattern ensures partial failures do not block your entire pipeline. Process what you can, log what you cannot, and review failures separately.

Related: Use "Pin Data" to Freeze Node Output · Break Large Workflows into Sub-Workflows

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

190 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book an introductory call