Skip to content
masterclass Buddy

Inngest · Pipe

onFailure

Use onFailure to run alerting, cleanup, metrics, or rollback logic after a function exhausts its retries. For failures across an environment, trigger a separate function with inngest/function.failed.

Last updated

Syntax

onFailure: async ({ error, event, step, runId }) => { /* failure handling */ }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • inngest/function.failed
  • Error handling & retries
  • Non-retriable errors
  • Rollbacks
  • RetryAfterError
  • step.run()

Source: Failure Handlers | After All Retries Fail - Inngest Docs. Checked 2026-11-03.