n8n-error-handling
하는 일
이 도구는 무언가 잘못되었을 때 자동화된 워크플로가 조용히 멈추지 않도록 돕습니다. 오류가 어떻게 처리되는지 설정하게 해 주어, 오류가 눈에 보이고 복구 가능하도록 만듭니다.
사용하는 경우
- ✓자동화된 워크플로가 요청(API/Webhook)에 응답해야 할 때.
- ✓사람이 지켜보지 않고 실행되며 신뢰성이 필요한 워크플로를 운영할 때.
- ✓실패가 눈에 띄고 쉽게 고칠 수 있기를 원할 때.
스킬 링크
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-error-handling/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“API 요청이 실패하면 3번 재시도하고 시도 사이에 5초를 기다리도록 워크플로를 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
개별 단계(노드)를 설정해, 오류가 발생했을 때 전체 과정을 멈추는 대신 오류 정보를 대체 경로로 보내도록 작동합니다. 이를 통해 재시도나 경고 전송처럼 오류를 처리하는 흐름을 만들 수 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
n8n Error Handling
When to Use
Use this skill for unattended workflows, webhook/API response contracts, retry design, error outputs, Error Trigger workflows, alerting, or any path where failure must be visible and recoverable.
Make retries bounded and idempotent, especially for sends, payments, and writes. Redact credentials, personal data, request bodies, and stack details from caller-facing responses and alerts; expose only the minimum diagnostic context required.
By default, when an n8n node throws, the whole workflow halts. For an interactive run you're watching, that's fine — you see the red node and fix it. For anything unattended (a webhook API, a cron job, a queue worker, an agent tool), it's the wrong default: the caller gets a timeout or an empty 500, the operator gets no alert, and the symptom is "the integration just stopped working" with no log and no clue.
This skill is about making failures loud, structured, and recoverable — and, best case, self-healing so transient blips never reach a human at all.
The two ideas that prevent most silent failures:
- Per-node error outputs — a node's failure routes down a second output you control, instead of killing the run.
- A workflow-level error workflow — a catch-all that fires for anything that escapes per-node handling (timeouts, crashes between nodes, unwired failures).
When you actually need this
| Workflow shape | Error handling posture |
|---|---|
Webhook / API (anything with Respond to Webhook) |
Required. Every fallible node's error output wired; status code matches cause. |
| Scheduled / cron / queue worker / agent tool (unattended) | Required. A workflow-level error workflow, plus retryOnFail on network nodes. |
| Internal one-off you run and watch yourself | Optional. Default onError: "stopWorkflow" is fine — you'll see the red node and re-run. |
The dividing line: if anyone other than you sees the output — a downstream system, an end user, an on-call engineer — the failure has to be handled, not swallowed. If you're the only watcher and the cost of failure is "I notice and re-run", looser is fine.
The #1 silent trap: per-node error output is a TWO-step setup
This is the single most common way an n8n workflow "handles" errors while actually swallowing them. Routing a node's failure to a handler takes two changes, and doing only one looks complete but misbehaves:
- Set
onError: "continueErrorOutput"on the node. This is what creates the second output. Without it,main[1]doesn't exist no matter what you wire. - Wire that error output (
connections.<node>.main[1], i.e.sourceIndex: 1) to a real handler. Without a target, the error data is emitted into the void.
Get one without the other and you hit a failure mode:
| What you did | What happens at runtime |
|---|---|
onError set, error output not wired |
Error data is silently discarded. Downstream doesn't fire. The dashboard shows the run as succeeded. Worst case — no error logged anywhere. |
Error output wired, onError not set |
The slot never fires; the handler is unreachable. On failure the workflow just halts (default stopWorkflow). |
| Both done | Failure routes down main[1] to your handler. ✅ |
Doing both with n8n_update_partial_workflow
// 1) Turn on the error output (creates main[1])
{ type: "updateNode", nodeName: "HTTP Request",
changes: { onError: "continueErrorOutput" } }
// 2) Wire the error output to a handler. sourceIndex: 1 = the error output.
{ type: "addConnection",
source: "HTTP Request",
target: "Handle Error",
sourceIndex: 1 }
sourceIndex: 0 is the success path, sourceIndex: 1 is the error path. (For IF nodes the aliases branch: "true"/"false" map to index 0/1; for a generic fallible node, use the explicit sourceIndex: 1.)
Then verify. This trap doesn't surface in validate_workflow — a half-wired error output validates clean. Pull the workflow with n8n_get_workflow and confirm both halves:
- The node's
onErroris"continueErrorOutput". connections["HTTP Request"].main[1]contains your handler.
Valid onError values:
| Value | Effect |
|---|---|
"stopWorkflow" (default) |
Error halts the whole workflow. |
"continueRegularOutput" |
Error item flows out the normal output. Rare, usually wrong — downstream gets error-shaped data and keeps going. |
…
자주 묻는 질문
이 도구를 쓰지 않고 오류가 나면 어떻게 되나요?
사람이 지켜보지 않고 실행되는 워크플로에서 오류가 발생하면, 아무도 모르는 사이에 작동을 멈추거나 무엇이 잘못되었는지 자세히 알려주지 않는 일반적인 오류를 호출자에게 반환할 수 있습니다.
「오류 출력」이란 무엇인가요?
무언가 잘못되었을 때 그냥 과정을 멈추는 대신, 워크플로의 단계(노드)가 정보를 보내는 추가 경로입니다.
「재시도(retry)」란 무엇인가요?
단계가 처음에 실패했을 때 작업을 다시 시도하도록 하는 설정입니다. 일시적인 네트워크나 서비스 오류에 유용합니다.
상세 정보
작성자의 원본 설명
Design visible, structured, recoverable n8n failures using error outputs, retries, Error Trigger workflows, and HTTP error responses.
인기도
- GitHub 스타
- 48k
- 순위
- #5271
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.