Skip to content

Commit 9db5911

Browse files
committed
fix retry logic to include 502, 503, 504 only among 5xx, remove 409
1 parent 47964c0 commit 9db5911

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gooey/core/http_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def _retry_timeout(response: httpx.Response, retries: int) -> float:
8686

8787

8888
def _should_retry(response: httpx.Response) -> bool:
89-
retriable_400s = [429, 408, 409]
90-
return response.status_code >= 500 or response.status_code in retriable_400s
89+
retry_on_codes = [429, 408, 502, 503, 504]
90+
return response.status_code in retry_on_codes
9191

9292

9393
def remove_omit_from_dict(

0 commit comments

Comments
 (0)