Skip to content

Commit

Permalink
fix retry logic to include 502, 503, 504 only among 5xx, remove 409
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Sep 11, 2024
1 parent 47964c0 commit 9db5911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gooey/core/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def _retry_timeout(response: httpx.Response, retries: int) -> float:


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


def remove_omit_from_dict(
Expand Down

0 comments on commit 9db5911

Please sign in to comment.