Skip to content

Commit

Permalink
Use Exception if 429 (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
fustom authored May 21, 2024
1 parent 6f01404 commit 12f64d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ariston/ariston_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def __request(
case 404:
return None
case 429:
raise RequestFailedError(response.status_code, response.text)
raise Exception(response.status_code, response.text)
case _:
if not is_retry:
time.sleep(5)
Expand Down Expand Up @@ -901,7 +901,7 @@ async def __async_request(
case 404:
return None
case 429:
raise RequestFailedError(response.status_code, response.text)
raise Exception(response.status_code, response.text)
case _:
if not is_retry:
await asyncio.sleep(5)
Expand Down

0 comments on commit 12f64d3

Please sign in to comment.