Skip to main content
The Rerun Failure Function action allows you to retry the failure function that executes when a workflow run enters the Dead Letter Queue (DLQ). The failure function is typically a cleanup or notification operation that runs automatically whenever a workflow is moved to the DLQ. This feature is particularly helpful for:
  • Ensuring that important cleanup operations are executed.
  • Guaranteeing that logging or alerting is completed after a workflow failure.
  • Recovering from temporary errors in the failure function itself.
By manually rerunning this function, you can ensure that critical operations—such as cleanup tasks, logging, or alerting—complete successfully even if the main workflow has failed.

You can retry the failure function of a workflow run if it has failed

You can perform this action programmatically as well:
import { Client } from "@upstash/workflow";

const client = new Client({ token: "<WORKFLOW_TOKEN>" });

await client.dlq.retryFailureFunction({
  dlqId: "dlq-12345",
});
This action is only available if the failure function itself has failed as well. If the failure function already succeeded, it cannot be rerun.You can view the status of the failure function in the DLQ and Logs dashboards, which indicate whether it succeeded or failed.