fix: making the publish trace error check broader (#14931)

This commit is contained in:
Douglas Yang
2025-12-11 18:19:57 -08:00
committed by GitHub
parent e9e7f15eb5
commit 6ce36b1232
+2 -6
View File
@@ -14,12 +14,8 @@ from urllib.request import Request, urlopen
def is_rate_limit_error(e):
"""Check if an exception is a rate limit error"""
return (
isinstance(e, HTTPError)
and e.code in [403, 429]
and "rate limit exceeded" in getattr(e, "error_body", "").lower()
)
"""Check if an exception is a GitHub permission/quota error that should not be retried"""
return isinstance(e, HTTPError) and e.code in [403, 429]
def make_github_request(url, token, method="GET", data=None):