Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

n8n: Retry a 429 or a 500, Fail Fast on a 401. HTTP Status Codes, Retry On Fail and the Error Output

Описание и применение

В n8n настройка повторных попыток для 429 и 5xx, отказ при 4xx и оповещение по Gmail предотвращает скрытые ошибки и ненужные повторные запросы.

Задача

An n8n workflow often fails because a supplier’s server is busy (429/500) or an API key has expired (401/403), causing silent retries or missed alerts.

Результат

The workflow now retries only for transient server errors, fails fast on authentication or client errors, and alerts the owner via email, preventing silent failures and unnecessary retries.

Рабочий процесс

  • Configure HTTP Request node to include response headers and never error
  • Set Retry On Fail to true, Max Tries 3, Wait Between Tries 5000ms
  • Add a Code node to inspect statusCode and decide action
  • If statusCode 200‑299: continue
  • If 429 or >=500: retry up to 3 times, respecting Retry‑After header
  • If 400,401,403,404: fail and send Gmail alert
  • Wire Error output to Gmail Send a message node

Доказательства

The most common way an n8n workflow fails in a small business isn't a bug. It's a supplier's server being busy at 6 AM.

Источник

Retry On Fail doesn't look at the code. A 401 gets retried three times, five seconds apart, exactly like a 503.

Источник

In the HTTP Request node, under Options, Response, turn on Include Response Headers and Status and Never Error.

Источник

  • Дата записи: 2026-10-23T16:26:10.211Z