Skip to content

Commit

Permalink
Don't retry on 500 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEdgeOfRage committed Jan 23, 2024
1 parent 517dfe3 commit 8a465d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dune_client/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__( # pylint: disable=too-many-arguments
retry_strategy = Retry(
total=5,
backoff_factor=0.5,
status_forcelist={429, 500, 502, 503, 504},
status_forcelist={429, 502, 503, 504},
allowed_methods={"GET", "POST", "PATCH"},
raise_on_status=True,
)
Expand Down
2 changes: 1 addition & 1 deletion dune_client/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
await self.disconnect()

async def _handle_response(self, response: ClientResponse) -> Any:
if response.status in {429, 500, 502, 503, 504}:
if response.status in {429, 502, 503, 504}:
try:
response.raise_for_status()
except ClientResponseError as err:
Expand Down

0 comments on commit 8a465d3

Please sign in to comment.