---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/91306#article
headline: "91306: Sink endpoint returned a server error"
url: https://www.twilio.com/docs/api/errors/91306
inLanguage: en
dateModified: 2026-10-27T17:14:57.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 91306: Sink endpoint returned a server error

Log Type: APPLICATION

Log Level: ERROR

## Description

Twilio records this error when Event Streams attempts to deliver an event, but the sink endpoint 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 sink 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 sink 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 sink failed](/docs/api/errors/91300)
* [91305: Sink endpoint rejected the event](/docs/api/errors/91305)
* [91308: Sink endpoint did not respond in time](/docs/api/errors/91308)

#### Additional resources

* [Event Streams overview](/docs/events)
* [Sink resource](/docs/events/event-streams/sink-resource)
* [Subscription resource](/docs/events/event-streams/subscription)
