> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reliability of Failure Function

The failure function is executed whenever a workflow run fails.

In some cases, the failure function itself may throw an error.
When this happens, it will be retried according to the workflow run's retry configuration.
If all retry attempts also fail, the failure function execution is marked as failed.

You can view and filter workflow runs with failed failure function executions in the DLQ dashboard.

<Frame caption="You can filter DLQ entries by failure function state">
  <img src="https://mintcdn.com/upstash/veMt3N2QLOAoUf0w/img/workflow/failure_callback_state_filter.png?fit=max&auto=format&n=veMt3N2QLOAoUf0w&q=85&s=bb2e7876881dd34056eec3c76de7f4fe" width="2562" height="1976" data-path="img/workflow/failure_callback_state_filter.png" />
</Frame>

From the DLQ dashboard, you can retry the failure function.

<Frame caption="You can filter DLQ entries by failure function state">
  <img src="https://mintcdn.com/upstash/veMt3N2QLOAoUf0w/img/workflow/retry_failure_callback.png?fit=max&auto=format&n=veMt3N2QLOAoUf0w&q=85&s=b821a3bd718fe7f8dfbb9f3600659b99" width="2568" height="1988" data-path="img/workflow/retry_failure_callback.png" />
</Frame>

You can perform this action programmatically as well:

```ts theme={"system"}
import { Client } from "@upstash/workflow";

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

const response = await client.dlq.retryFailureFunction({
  dlqId: "dlq-12345" // The ID of the DLQ message to retry
});
```
