SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Understanding Segment Retry Logic for HTTP Status Codes

Question

I am seeing HTTP 400 and 500 errors in my logs and want to understand the retry logic. How does Twilio Segment process retries for failed requests, and which HTTP status codes trigger a retry?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

Segment handles retries based on the HTTP status code returned by the server:
  • 5xx HTTP response codes: Most 5xx codes (such as 500 Internal Server Error) will trigger a retry, as these indicate a temporary server issue.
    • Exceptions: HTTP 501 and 505 will be dropped and not retried.
  • 4xx HTTP response codes: Most 4xx codes (such as 400 Bad Request) will not be retried, since these usually indicate a problem with the request itself (for example, an invalid payload or write key).
    • Exceptions: HTTP 408 (Request Timeout), 410 (Gone), 429 (Too Many Requests), and 460 will be retried.
  • Client-side SDKs: Client-side SDKs do not retry requests that are rejected due to permanent issues, such as invalid formatting or exceeding size limits.

 

Additional Information

 

Have more questions? Submit a request
Powered by Zendesk