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

# Handling webhook errors

> Understand which responses Bodyguard accepts from your endpoint, the retry policy, and the emails sent when deliveries fail.

This page describes how Bodyguard handles the responses of your endpoint, its retry policy, and the emails it sends when deliveries fail.

## Response handling

Bodyguard judges a delivery by the response of your endpoint:

| Response | Result |
| - | - |
| `2xx` | Success. The notification is delivered. |
| Any other status code, or no response within 10 seconds | Failure. |

Every failure enters the retry policy described below.

## Retry policy

If a delivery fails, Bodyguard retries it several times over a period of time. Every attempt of the same notification carries the same [`webhook-id`](https://docs.bodyguard.ai/en/api-reference/reference/webhooks/payloads#headers) header, so you can [deduplicate](https://docs.bodyguard.ai/en/api-reference/webhooks/quick-start.md#process-events-safely) them.

If your endpoint keeps failing, Bodyguard automatically sets the webhook status to `ERROR` and stops sending notifications to it. Events that occur while the webhook is in error are not sent, and can't be replayed when you enable it again. After you fix the issue, open the dashboard (**Settings** > **Webhooks**) and set the status back to `ENABLED`.

## Emails

Bodyguard sends these emails to every [contact](https://docs.bodyguard.ai/en/api-reference/webhooks/configuration.md#contacts) of the webhook:

| Email | When it is sent |
| - | - |
| Warning | At the first failure. At most one warning email per day. |
| Broken webhook | When the webhook status is set to `ERROR`. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.