Generated banner for N8n Error Handling Official
Generated logo for N8n Error Handling Official

N8n Error Handling Official

n8nOfficialPublished by n8n

  • Skill
  • Guidelines
  • Automation and integrations
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

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.
— the description by n8n

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a framework for implementing robust error handling in n8n workflows. It focuses on ensuring that failures in unattended, scheduled, or webhook-triggered workflows are captured, surfaced, and handled appropriately rather than failing silently. The guidelines cover per-node error wiring, workflow-level error catching, structured response mapping, and input validation patterns to ensure reliable execution and clear communication of failure states.

What it does

  • Defines patterns for wiring per-node error outputs to prevent silent workflow halts.
  • Outlines the configuration of workflow-level error workflows for capturing unhandled exceptions.
  • Provides conventions for mapping error causes to appropriate HTTP status codes.
  • Details the use of structured error response bodies for API-bound workflows.
  • Explains how to configure node-level retries for transient network failures.
  • Offers a schema validation pattern using Set nodes and IIFEs for webhook inputs.

When to use it

  • When building webhook-triggered APIs that require reliable error reporting.
  • When designing scheduled or unattended workflows where silent failures are unacceptable.
  • When integrating with third-party APIs or databases prone to transient errors.
  • When you need to distinguish between caller-side validation errors and internal execution failures.

Advantages

  • Prevents silent failures that leave callers or monitoring systems without feedback.
  • Enables structured, actionable error reporting for on-call or support teams.
  • Improves system resilience through automated retry logic for transient issues.
  • Standardizes API responses to help callers identify and correct their own input errors.

Usage examples

“How do I ensure my webhook API returns a 400 error when a required field is missing?”
The skill advises validating input upstream using an IF/Switch branch or a Set-based schema validator, then using a dedicated Respond to Webhook node configured with a 400 status code.
“What should I do to handle transient 429 errors from an external API?”
Configure the HTTP Request node with retryOnFail enabled, setting maxTries to 3 and waitBetweenTries to 5000ms to absorb transient blips before surfacing an error.
“How can I catch errors that occur between nodes in my workflow?”
Configure a workflow-level error workflow via the workflow settings, which will be triggered by an Error Trigger node if an unhandled error escapes per-node handling.
“How do I wire multiple nodes to a single error responder?”
Set each fallible node to 'continueErrorOutput', then connect their output(1) ports to a single Respond to Webhook node to centralize error reporting.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/n8n-io/n8n-error-handling-official/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip n8n-error-handling-official.zip -d .agents/skills

Documentation by n8n

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 network service, not just HTTP Request. The engine retries on any error, with no per-status-code filter, and the engine caps maxTries at 5 and waitBetweenTries at 5000ms (packages/core/src/execution-engine/workflow-execute.ts). See n8n-node-configuration-official HTTP_NODES.md and AI_NODES.md for node-specific notes.

Response shapes: map the cause to the status code

A 5xx response with text/plain "Internal Server Error" is technically 5xx but useless. And not every error is 5xx. Match the status code to why the request failed.

Common mistake: wiring every error path to a single Respond to Webhook returning 500 "internal_error". Every failure looks the same to the caller, even when they sent bad input. Breaks monitoring: you can't distinguish real outages from bad caller input.

Default mapping by cause:

CauseStatusError codePath
Required field missing or wrong type400validation_errorValidate up front with the Set-based schema validator (see references/examples/validation-subworkflow.ts for the bare pattern and validation-subworkflow-usage.ts for the endpoint template), or, for trivial cases, an inline IF/Switch + dedicated 400 Respond. Don't go through error outputs. Ideally echo the schema in the response so the caller can self-correct.
Auth missing or invalid401unauthorizedSame. Check up front, return 401 directly.
Authenticated but not allowed403forbiddenSame.
Resource ID exists in request, doesn't in your data404not_foundBranch off the lookup result, not the lookup error.
Operation conflicts with current state (duplicate, race)409conflictDetect with logic, not error output.
Caller exceeded rate limit429rate_limit_exceededSet Retry-After header.
Node threw and you don't know why500internal_errorThe error-output path.
Third-party API errored502upstream_errorError output of the HTTP Request node.
Workflow can't currently process (downstream down, rate-limited upstream)503service_unavailableDetect via specific error, return with hint.
Third-party API timed out504upstream_timeoutError output filtered by error message.

Two distinct flows:

  • Validation failures (4xx) are checked upstream of the work, via IF/Switch branches, not error outputs. Use a dedicated Respond per shape (400 missing field, 401 no auth, etc.).

  • Execution failures (5xx) come out of error outputs ("we tried, something broke"). A single error responder for all 5xx is fine. Differentiate the body's error code by inspecting the failed node where useful.

One Respond, expression-driven status code. When the error path differs only by status code and message text (same body shape, no header/content-type changes), don't fan out to N Respond nodes via a Switch. The Respond to Webhook node accepts expressions in its Response Code and body fields. Compute the code inline, so one Respond node carries the whole error path.

// Response Code on a single Respond to Webhook node:
{{ (() => {
    const msg = $json.error?.message || $json.message || ''
    if (msg.includes('INVALID_ID')) return 400
    if (/429|too many/i.test(msg)) return 429
    if (/openrouter|anthropic|llm/i.test(msg)) return 502
    return 500
})() }}

Switch + N Responds only earn their place when responses diverge structurally: different headers, different body shapes, redirects, different content types. Same shape with a different number is one expression-driven Respond.

For full conventions including correlation IDs, retryable-vs-fatal flags, validation details, and rate-limit shapes, see references/RESPONSE_SHAPES.md.

Workflow-level error workflows

For unattended workflows, configure the instance's error workflow (or per-workflow override) to point at a workflow that:

  1. Captures the failure (workflow name, execution ID, error, stack).

  2. Notifies someone (Slack, email, on-call).

  3. Optionally enqueues a retry (with backoff).

Catches what per-node handling misses: timeouts, crashes between nodes, errors in unwired nodes.

See references/ERROR_WORKFLOWS.md.

Reference files

FileRead when
references/API_WORKFLOWS.mdBuilding or reviewing a webhook-trigger / respond-to-webhook workflow
references/ERROR_WORKFLOWS.mdSetting up workflow-level error catching for production workflows
references/RESPONSE_SHAPES.mdDefining the response body conventions for your APIs
references/NODE_ERROR_OUTPUTS.mdWiring a per-node error output on individual fallible nodes

Anti-patterns

Anti-patternWhat goes wrongFix
Webhook → process → respond, no error branchCaller gets timeout or empty 500Wire every fallible node's output(1) to a Respond to Webhook
Single Respond to Webhook for both pathsBody shape doesn't tell caller what happenedTwo Respond nodes, one per path, with explicit codes and bodies
Error path returns 200 with { "error": ... } bodyCaller's HTTP client treats it as success, so error handling never firesAlways 4xx/5xx for error paths
Catching errors in Code node and returning them as dataDownstream sees error-shaped data, workflow continuesLet it throw, configure onError: 'continueErrorOutput' and wire the error path
Production workflow with no workflow-level error workflowA genuine failure goes nowhereSet up an error workflow. See ERROR_WORKFLOWS.md
Generic "Internal Server Error" on every failureCan't distinguish caller bug from upstream from rate limitStructured error codes. See RESPONSE_SHAPES.md
Production node calls a flaky or rate-limited API with no retryOnFailEvery transient 429 or upstream blip surfaces as a 5xx, and alerts fire on noiseSet retryOnFail: true, maxTries: 3, waitBetweenTries: 5000 on the node. See "Self-healing on transient failures"
500 for everything not a 200Caller can't separate their bad input from your outage, so their monitoring fires on your noiseMap cause → status code. Caller issues are 4xx.
Switch over the error message → N Respond nodes that differ only by status code5 nodes for what's one Respond with an expression-driven Response CodeCompute the code inline in a single Respond. See "One Respond, expression-driven status code" above.

Files

references/API_WORKFLOWS.md

API workflows

The canonical n8n pattern for "this workflow is an HTTP API":

Webhook trigger → [processing] → Respond to Webhook

This file covers wiring that pattern with proper error handling so the API behaves under failure, not just happy-path.

The shape

A production webhook API:

                        ┌─→ Validate input ─→ ... ─→ Respond (200, success body)
Webhook trigger ───────┤
                        └─→ (any error output)
                              → Respond (5xx, structured error body)
                              → (optional) Log / notify

Variants:

  • Multiple processing branches: each eventually flows to either success or error Respond.

  • Long-running work: webhook responds 202 immediately, work continues async. See end of file.

Wiring every fallible node

For each fallible node (HTTP, DB, third-party, validation):

  1. Set onError: 'continueErrorOutput' in the node config.

  2. Wire output(1) to your error Respond node, possibly via a logger or normalizer.

Concretely:

const fetchUser = node({
    type: 'n8n-nodes-base.postgres',
    config: {
        parameters: { /* ...query config... */ },
        onError: 'continueErrorOutput',
    },
})

const callExternal = node({
    type: 'n8n-nodes-base.httpRequest',
    config: {
        parameters: { /* ...config... */ },
        onError: 'continueErrorOutput',
    },
})

const respondError = node({
    type: 'n8n-nodes-base.respondToWebhook',
    config: {
        parameters: {
            responseCode: 502,
            responseBody: '={{ JSON.stringify({ error: "upstream_error", message: $json.error?.message ?? "External service failed" }) }}',
            options: { responseHeaders: { entries: [{ name: 'Content-Type', value: 'application/json' }] } },
        },
    },
})

workflow
    .add(webhook.output(0).to(fetchUser))
    .add(fetchUser.output(0).to(callExternal))
    .add(callExternal.output(0).to(respondSuccess))

    // Error paths: both go to the same responder
    .add(fetchUser.output(1).to(respondError))
    .add(callExternal.output(1).to(respondError))

Three things to notice:

  1. One respondError for many sources. Fan-in keeps the workflow readable.

  2. Both fallible nodes have onError: 'continueErrorOutput'. If either is missing, that node's failure halts the workflow instead of routing.

  3. The error body uses an expression to surface the actual error message. Be careful what you leak. See "Don't leak internals" below.

What "fallible" means

A node is fallible if any of these can happen:

  • Network call (HTTP, third-party API, DB).

  • Auth failure (credential expired, token rotated).

  • Schema mismatch (DB column missing, JSON parse failure).

  • Rate limit (429 from upstream).

  • Logic error (Code node throws).

  • File operation (missing path, permissions).

Nodes not typically fallible:

  • Set / Edit Fields on pure data (can still fail on bad input, so validate upstream).

  • IF / Switch with simple expressions (if it throws, it's a bug, not something to catch).

  • Function nodes without I/O (pure transformations).

When in doubt, wire error handling. The cost is one extra connection.

The "Validate input" stage: where most 4xx responses live

Validate webhook input before processing. Fail fast with 4xx, don't lump caller-side errors with real outages.

Validation failures go through IF/Switch + dedicated Respond, not error outputs. They're expected failures with a known response, not node failures.

const validate = ifElse({
    config: {
        parameters: {
            conditions: { /* check required fields */ },
        },
    },
})

const respondBadRequest = node({
    type: 'n8n-nodes-base.respondToWebhook',
    config: {
        parameters: {
            responseCode: 400,
            responseBody: '={{ JSON.stringify({ error: "validation_error", message: "Missing required field: customer_id" }) }}',
        },
    },
})

workflow
    .add(webhook.output(0).to(validate))
    .add(validate.onTrue(processing))             // valid → process
    .add(validate.onFalse(respondBadRequest))     // invalid → 400
Schema validator (Set IIFE)

For any webhook needing structured input validation, lift the Set-based validator pattern, not a hand-rolled IF chain. Two example files are the source of truth:

  • examples/validation-subworkflow.ts: the bare pattern (Webhook → Set → expression-driven Respond). Useful as a minimal reference.

  • examples/validation-subworkflow-usage.ts: the endpoint pattern (Webhook → Set → If valid → your business logic → 200 success / 400 with structured body). Lift this into any new endpoint.

The procedure for using these:

  1. Lift the usage-example structure into your endpoint. The node graph (Webhook → Validate Schema → If Params Valid → your logic → success/400 Respond) is already the right shape. Replace the Your workflow logic here NoOp with your real processing.

  2. Edit REQUIRED_SCHEMA and the per-field checks inside the IIFE. The Set node's result assignment holds an inline IIFE. The REQUIRED_SCHEMA constant at the top is for echo-back; the actual checks live in the per-field if/else if block below it. Add, remove, or change checks to match your endpoint's input shape.

  3. Don't change the output keys. The IIFE returns { valid, validationError, details, requiredSchema }. The Respond nodes consume those names. Renaming any of them breaks the response body.

The 400 body shape ({ error: "validation_error", message, details, request_schema }) matches the default in RESPONSE_SHAPES.md. Don't deviate.

Output contract. The Set node's result field (an object) is what downstream nodes branch on:

  • Valid: { valid: true, validationError: null }

  • Invalid: { valid: false, validationError: <human-readable summary string>, details: { <path>: <message>, ... }, requiredSchema: <the schema, echoed back> }

The usage example maps these into the standard 400 body: validationError becomes message, details is forwarded as-is, and requiredSchema becomes request_schema. The schema is echoed back so the caller (or an LLM) can self-correct.

Supported constraint patterns. The hand-crafted IIFE covers the same subset of JSON Schema constraints as a generic validator, applied to your specific schema:

CategoryWhat to write inline
Required field presentif (!("name" in body)) errors.push(...)
Type checkelse if (typeof body.name !== "string") errors.push(...)
String constraintsbody.name.length < N, /regex/.test(body.email)
Number constraintsbody.seat_count < min, > max, Math.floor(v) !== v for integer
Enum["a","b","c"].indexOf(body.plan) === -1
ArrayArray.isArray(body.tags), body.tags.length < N
Conditionalnest the checks inside if (body.type === "X") { ... }

Schema design rules (REQUIRED_SCHEMA constant is what gets echoed back to the caller):

  • Every field SHOULD have a description in plain language. The IIFE appends them to error lines (• name: Missing required field "name" - Customer full name).

  • Use integer type (with the Math.floor(v) !== v check) for whole numbers.

  • Use a literal array for enums and .indexOf(...) === -1 to check.

  • Use additionalProperties: false semantically (echoed back) and add an explicit "Unknown field" check in the IIFE if you want to reject extras at runtime.

Embedding gotcha: regex backslashes in the REQUIRED_SCHEMA literal. Inside the SDK's TS template literal, regex \S written as a JS string needs four backslashes:

email: { type: "string", pattern: "^\\\\S+@\\\\S+\\\\.\\\\S+$", description: "Contact email" }

The chain: TS template literal \\\\ → string \\ → JS string \\ (escape) → runtime char \. The regex literal in the IIFE itself uses the simpler form /^\\S+@\\S+\\.\\S+$/ (two backslashes per \S in TS source).

Example error output. Given a schema requiring name, email, plan, seat_count, and a non-empty tags array, a malformed payload produces:

Validation failed (5 issues):
• name: Missing required field "name" - Customer full name
• email: "not-an-email" is not valid - Contact email address
• plan: "premium" is not an allowed value. Must be one of: starter, pro, enterprise - Subscription plan
• seat_count: Expected type "integer" but got "non-integer number" - Number of licensed seats
• tags: Must have at least 1 item(s), got 0 - At least one tag for categorization

The description from each field is pulled into the message, so callers and downstream LLMs get actionable hints, not just a "validation failed" opaque string.

Real APIs need more than one 4xx path. Common ones to wire before processing:

Webhook trigger
  → Auth check (header present + valid?)
      ├── No → Respond 401 unauthorized
      └── Yes ↓
  → Validate input (required fields, types, value ranges)
      ├── Invalid → Respond 400 validation_error (with `details` per field)
      └── Valid ↓
  → Authorization check (does this caller's auth allow this operation?)
      ├── Not allowed → Respond 403 forbidden
      └── Allowed ↓
  → Lookup target resource
      ├── Doesn't exist → Respond 404 not_found
      └── Exists ↓
  → Processing stage (HTTP calls, DB writes, etc.). This is where 5xx errors come from

Each upstream check is a separate IF/Switch + Respond pair. That's not over-engineering. It gives the caller a useful error code instead of a generic 500.

5xx error responses: the execution-failure path

Past validation, remaining errors are 5xx: nodes failing, upstream timing out, etc. Wire via per-node error outputs.

A single error responder for all 5xx is fine, but differentiate the body by inspecting which failure happened:

const respondError = node({
    type: 'n8n-nodes-base.respondToWebhook',
    config: {
        parameters: {
            responseBody: `={{ (() => {
                const err = $json.error ?? {}
                const node = err.node?.name ?? 'unknown'

                // Distinguish by failed node or error message
                if (err.message?.includes('timeout')) {
                    return JSON.stringify({ error: 'upstream_timeout', message: 'External service did not respond in time' })
                }
                if (err.message?.includes('rate limit')) {
                    return JSON.stringify({ error: 'service_unavailable', message: 'Rate limit hit on upstream service' })
                }
                return JSON.stringify({ error: 'internal_error', message: 'An internal error occurred' })
            })() }}`,
            options: {
                responseCode: `={{ $json.error?.message?.includes('timeout') ? 504 : ($json.error?.message?.includes('rate limit') ? 503 : 500) }}`,
                responseHeaders: { entries: [{ name: 'Content-Type', value: 'application/json' }] },
            },
        },
    },
})

Don't leak internals in error responses

Tempting:

responseBody: '={{ JSON.stringify({ error: "internal_error", details: $json.error }) }}',

What $json.error actually contains: stack traces, internal node names, sometimes connection strings, sometimes upstream responses with embedded secrets.

Better: log the full error privately, return a sanitized message:

const respondError = node({
    type: 'n8n-nodes-base.respondToWebhook',
    config: {
        parameters: {
            responseCode: 502,
            responseBody: '={{ JSON.stringify({ error: "upstream_error", message: "External service failed" }) }}',
        },
    },
})

// Separately, log full details
const logError = node({
    type: 'n8n-nodes-base.httpRequest',
    config: {
        parameters: { /* ...send full error to your logging service / Sentry / Slack... */ },
    },
})

.add(callExternal.output(1).to(logError))
.add(logError.output(0).to(respondError))

The caller sees a clean message. Internal details stay internal. If you operate distributed tracing and want a correlation ID in the body, add request_id per the "When to add request IDs" section in RESPONSE_SHAPES.md (and add it consistently across success and error responses on every endpoint, not just here).

Correlation IDs (optional, opt-in)

The default response shape doesn't include a request_id, see "When to add request IDs" in RESPONSE_SHAPES.md for when it's worth adding. If you do opt in (you're running distributed tracing or log correlation), two ways to source the ID:

  1. Caller-supplied: check X-Request-ID header, pass through and include in responses.

  2. Generated: use $execution.id or generate a UUID, include in responses and logs.

Either works. Generated is easier, caller-supplied is better for distributed tracing. Do it on every endpoint or none, partial coverage is worse than no coverage.

Status code conventions

The status code is the caller's first signal. Be deliberate:

  • 2xx: success. 200 sync, 202 "accepted, processing".

  • 4xx: caller's fault. 400 (bad input), 401 (no auth), 403 (not allowed), 404 (not found), 429 (rate limited).

  • 5xx: your fault. 500 (unexpected internal), 502 (upstream broken), 503 (temporarily down), 504 (upstream timeout).

Distinguishing 4xx from 5xx matters because:

  • Caller monitoring alerts on 5xx (your fault) but not 4xx (their fault).

  • 5xx suggests retry, 4xx suggests don't.

  • Aggregated error rates segment by class.

Async / 202-Accepted pattern

If the work takes longer than the caller wants to wait:

Webhook trigger
  → Validate input
  → Respond to Webhook (202, { "job_id": "..." })  ← respond immediately
  → Continue processing in same workflow OR Execute Workflow (sub-workflow)
  → On completion: callback / queue / email

The webhook returns 202 with a job_id (the identifier the caller will use to poll status), and processing continues async. The caller polls a status endpoint or receives a callback to a webhook they provided. The job_id is intrinsic to the async pattern (it's how you find the work later), not the optional request_id correlation field discussed above.

Its own pattern with its own gotchas (idempotency, callback retries, status tracking). Build deliberately.

Verifying the API workflow

Before publishing:

  1. Test the success path with test_workflow. Confirm shape and code. API workflows almost always have side-effecty downstreams (DB writes, third-party calls, comms), so ask the user before testing. See n8n-workflow-lifecycle-official references/TESTING.md.

  2. Trigger an error path. Use prepare_workflow_pin_data to inject a value that breaks a processing node, then test_workflow. Confirm the error Respond fires with the right code/body.

  3. Verify connections via get_workflow_details. Every fallible node has onError: 'continueErrorOutput' AND output(1) wired. See references/NODE_ERROR_OUTPUTS.md.

  4. Confirm no internal details leak in the error body.

If any are off, fix before publish.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
n8n
Publisher
n8n (Official)
Source
n8n-io/skills · skills/n8n-error-handling-official · commit 27b6b9f
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by n8n or n8n.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download n8n-error-handling-official.zip