---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/91306#article
headline: "91306: Destination endpoint returned a server error"
url: https://www.twilio.com/docs/api/errors/91306
inLanguage: en
dateModified: 2026-11-04T19:15:20.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 91306: Destination endpoint returned a server error

Log Type: APPLICATION

Log Level: ERROR

## Description

Twilio records this error when Data Destinations attempts to deliver an event, but the destination responds with an HTTP `5xx` server error status code.

Because a `5xx` error indicates a temporary processing failure on the destination server rather than a rejected payload, Twilio automatically retries event delivery according to the retry policy.

### Possible causes

* Your receiving service encountered an unhandled exception or crash while processing the incoming payload (HTTP 500).
* A dependency required by your endpoint (such as a database, cache, or internal API) was unavailable or timing out.
* Your destination was overwhelmed by traffic or active connections.
* A load balancer or reverse proxy returned 502, 503, or 504 because no healthy backend was available.
* The request arrived during an active application deployment, restart, or rolling update.

### Possible solutions

* Check your target destination logs and error-tracking system around the failure timestamp to identify unhandled exceptions.
* Return an immediate HTTP `200 OK` or `202 Accepted` response upon receiving the payload, offloading heavy processing (like database writes) to a background worker queue.
* Verify that your load balancer, server health checks, and autoscaling policies are correctly configured to handle peak event volumes.
* Ensure your deployment strategy uses connection draining so in-flight requests from Twilio complete cleanly during code updates.

### Related errors

* [91300: Event delivery to destination failed](/docs/api/errors/91300)
* [91305: Destination endpoint rejected the event](/docs/api/errors/91305)
* [91308: Destination endpoint did not respond in time](/docs/api/errors/91308)

#### Additional resources

* [Data Destinations overview](/docs/data-destinations)
* [Create a destination](/docs/data-destinations/api-quickstart#create-a-destination)
* [Create a subscription](/docs/data-destinations/api-quickstart#create-a-subscription)
