n8n-error-handling
Fungsinya
Tool ini membantu memastikan workflow otomatis Anda tidak berhenti diam-diam saat terjadi masalah. Tool ini memungkinkan Anda mengatur cara error ditangani sehingga error terlihat dan bisa diperbaiki.
Kapan dipakai
- βSaat workflow otomatis perlu merespons sebuah request (API/Webhook).
- βUntuk workflow yang berjalan sendiri tanpa pengawasan dan perlu andal.
- βSaat Anda ingin kegagalan segera diketahui dan mudah diperbaiki.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-error-handling/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βAtur workflow saya agar jika request API gagal, sistem mencoba ulang 3 kali dengan jeda 5 detik di setiap percobaan.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini bekerja dengan mengatur masing-masing langkah (node) agar, ketika terjadi error, informasi error dikirim ke jalur alternatif, bukan menghentikan seluruh proses. Dengan begitu, Anda bisa membuat alur untuk menangani error ini, misalnya mencoba ulang atau mengirim notifikasi.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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. |
β¦
Pertanyaan umum
Apa yang terjadi jika saya tidak memakai tool ini dan terjadi error?
Jika error terjadi pada workflow yang berjalan tanpa pengawasan, workflow bisa berhenti bekerja tanpa ada yang menyadarinya, atau hanya mengembalikan error umum ke pemanggil tanpa detail tentang apa yang salah.
Apa itu 'error outputs'?
Error outputs adalah jalur tambahan yang bisa dipakai sebuah langkah (node) di workflow untuk mengirim informasi saat terjadi masalah, alih-alih hanya menghentikan proses.
Apa itu 'retry'?
Retry adalah pengaturan yang membuat sebuah langkah mencoba lagi tugasnya jika percobaan pertama gagal. Pengaturan ini berguna untuk error jaringan atau layanan yang bersifat sementara.
Detail
Deskripsi asli dari pembuat
Design visible, structured, recoverable n8n failures using error outputs, retries, Error Trigger workflows, and HTTP error responses.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #5271
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.