Skip to content

Error handler

An error handler is a step you attach to a flow so it runs automatically whenever another step in that flow fails.

Once a step’s retries (if any) are exhausted and it still hasn’t succeeded, the error handler step runs. It receives the failed step’s output, with the failure details available in an error field, so it can log the error, notify someone, or attempt cleanup.

An error handler script can be written in:

  • Python
  • TypeScript
  • Go

Two error handler scripts are available on the Orvanta Hub, ready to attach as-is:

  • Slack error handler: posts a message to a Slack channel when a step errors out.
  • Discord error handler: posts the same kind of message to a Discord channel instead.

Say a flow enriches a CRM record from an incoming email. If a later step in that flow fails — say, the enrichment call to a third-party API times out — an error handler can still write the raw email data to the CRM before failing, so the contact isn’t lost even when the rest of the processing didn’t complete.