fix(failover): narrow service-unavailable to require overload indicator (#32828) (#36646)

Merged via squash.

Prepared head SHA: 46fb430612
Co-authored-by: jnMetaCode <12096460+jnMetaCode@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
This commit is contained in:
jiangnan
2026-03-06 05:01:57 +08:00
committed by GitHub
parent f014e255df
commit 029c473727
4 changed files with 24 additions and 2 deletions

View File

@@ -15,12 +15,16 @@ const ERROR_PATTERNS = {
overloaded: [
/overloaded_error|"type"\s*:\s*"overloaded_error"/i,
"overloaded",
"service unavailable",
// Match "service unavailable" only when combined with an explicit overload
// indicator — a generic 503 from a proxy/CDN should not be classified as
// provider-overload (#32828).
/service[_ ]unavailable.*(?:overload|capacity|high[_ ]demand)|(?:overload|capacity|high[_ ]demand).*service[_ ]unavailable/i,
"high demand",
],
timeout: [
"timeout",
"timed out",
"service unavailable",
"deadline exceeded",
"context deadline exceeded",
"connection error",