Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

n8n-error-handling-official

БесплатноЗапускает вложенные скриптыНе проверен

Use when building any webhook-triggered workflow, scheduled/production-bound workflow, wiring a per-node error output, or any workflow where silent failure…

n8n-ioот n8n-io★ 644 звезды на GitHub

Об этом скилле

n8n Error Handling

Default n8n node behavior: error → workflow halts → caller gets nothing useful. For unattended workflows (webhook APIs, scheduled jobs, queue workers), that default is wrong. The symptom is "the integration just stopped working" with no log, no message, no clue.

This skill is about handling errors so failures are loud, structured, and recoverable. Or best case scenario, handled in a way where it self heals.

Non-negotiables

For any API-shaped workflow (webhook trigger paired with Respond to Webhook):

  1. Every fallible node's error output is wired, and both paths end at a Respond to Webhook. No hanging error branches, or the caller would see a timeout. "Fallible" = HTTP, DB, third-party API, file operation, anything that throws.
  2. Status code maps to cause. Caller's fault → 4xx, your fault → 5xx. A 200 default on an error path produces silent failure: caller thinks success, processes empty data.

For any unattended workflow (scheduled, cron, queue-driven, agent tool): 3. Set a workflow-level error workflow. Catches what escapes per-node handling: timeouts, crashes between nodes, errors in unwired nodes. Set it via update_workflow setWorkflowSettings.errorWorkflow (n8n 2.29.0+); the target must be a published workflow containing an active Error Trigger, or the update is rejected. See references/ERROR_WORKFLOWS.md.

Strong defaults

  • Error response bodies are structured. Not just "Internal Server Error". Use { "error": "<short identifier>", "message": "<human-readable>" }. See references/RESPONSE_SHAPES.md.
  • Network-calling nodes have retryOnFail configured. Transient 429s and upstream blips get absorbed before reaching the error path. See "Self-healing on transient failures" below.

When error handling can be looser

Internal one-off workflows where you're the only user, you watch each run, and the cost of failure is "I notice and re-run". Default onError: 'stopWorkflow' is fine. The line: if anyone other than you sees the output (downstream system, end user, on-call), the non-negotiables apply.

API workflow shape

The canonical webhook-API workflow:

Webhook trigger
  ├── (success path)  → Process → Respond to Webhook (200, body)
  └── (any node's error output)
                       → Respond to Webhook (5xx, structured error body)
                       → Optional: log to error tracker / logger / notify channel

For a complete walkthrough including how to wire multiple fallible nodes to a single error responder, see references/API_WORKFLOWS.md.

Schema validator (Set IIFE)

For any webhook API doing input validation, lift the Set-based schema validator pattern into the endpoint instead of writing IF/Switch chains per field. The two example files are the source of truth:

  • references/examples/validation-subworkflow.ts: the bare pattern (Webhook → Set with the validation IIFE → Respond, expression-driven status code). Useful as a minimal demo.
  • references/examples/validation-subworkflow-usage.ts: the endpoint pattern (Webhook → Set → If valid → your business logic → 200 success / 400 with the standard {error: "validation_error", message, details, request_schema} body). Lift this into your endpoint and replace the NoOp placeholder with real logic.

The procedure for an agent using this:

  1. Lift the usage-example structure into the new endpoint. Webhook → Set (Validate Schema) → If Params Valid → your logic → success/400 Respond. Don't reinvent.
  2. Edit the IIFE for your schema. Update REQUIRED_SCHEMA and the per-field checks inside the Set node's expression for your endpoint's input shape. The pattern below the schema constant is mechanical: presence check, type check, constraint check, push to errors[].
  3. Leave the output shape alone. valid, validationError, details, requiredSchema are the contract the Respond node consumes. Renaming them breaks the response body.

The full procedure, supported constraint patterns, schema design rules, and the ={{ ... }} wrapping gotchas live in references/API_WORKFLOWS.md "Schema validator (Set IIFE)".

Per-node error setup (recap)

Each fallible node needs two changes (see references/NODE_ERROR_OUTPUTS.md):

  1. Set onError: 'continueErrorOutput' on the node config.
  2. Wire output(1) to your error handler.

Both required. One without the other is the silent-failure mode.

Self-healing on transient failures

Before wiring the error path, configure node-level retry on any node making a network call (HTTP Request, comms like Gmail/Slack/Discord, DB, AI, third-party API nodes). Transient 429s and brief upstream blips get absorbed, so the error output then only fires on real failures, and alerts and 5xx responses reflect actual problems instead of noise.

{
    retryOnFail: true,
    maxTries: 3,
    waitBetweenTries: 5000,    // ms; 5000 is the max and should be your default
}

Works on any node that calls a

Полный SKILL.md на GitHub

Установить n8n-error-handling-official в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/API_WORKFLOWS.mdreferences/ERROR_WORKFLOWS.mdreferences/NODE_ERROR_OUTPUTS.mdreferences/RESPONSE_SHAPES.mdreferences/examples/validation-subworkflow-usage.tsreferences/examples/validation-subworkflow.ts

FAQ

Что делает скилл n8n-error-handling-official?

Use when building any webhook-triggered workflow, scheduled/production-bound workflow, wiring a per-node error output, or any workflow where silent failure would drop user-visible work. Triggers on "webhook", "respond to webhook", "API", "production", "error", "failure", "5xx", "try/catch", "error workflow", "onError", "continueErrorOutput", "error branch", "node error output", "output(1)", "main[1]", "scheduled", or any workflow that runs unattended.

Как установить скилл n8n-error-handling-official?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл n8n-error-handling-official запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить n8n-error-handling-official с