From bf5efb8a7894237fcf89fa999e8f950ce7fd494d Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Thu, 29 Jan 2026 08:48:16 -0800 Subject: [PATCH] Add 502 handling to Webonary retry (user saw this testing LT-22342) --- Src/xWorks/WebonaryClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Src/xWorks/WebonaryClient.cs b/Src/xWorks/WebonaryClient.cs index fd8dc21b67..f42fac62fd 100644 --- a/Src/xWorks/WebonaryClient.cs +++ b/Src/xWorks/WebonaryClient.cs @@ -113,9 +113,10 @@ private string PostToWebonaryApi(string address, string postBody, string extraAr var statusCode = ((HttpWebResponse)ex.Response).StatusCode; - // Only retry on 504 Gateway Timeout or 503 Service Unavailable + // Only retry on 504 Gateway Timeout or 503 Service Unavailable or 502 Bad Gateway (common for server overload) if ((statusCode == HttpStatusCode.GatewayTimeout || - statusCode == HttpStatusCode.ServiceUnavailable) && attempt < maxRetries) + statusCode == HttpStatusCode.ServiceUnavailable || + statusCode == HttpStatusCode.BadGateway) && attempt < maxRetries) { Thread.Sleep(retryDelay); retryDelay *= 2; // Exponential backoff