Skip to content

Commit

Permalink
[Community] retry on 503 error
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Aug 14, 2024
1 parent 4b1151d commit ac1834b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ async def httpx_retrier_wrapper(*args, **kwargs):
error = None
try:
resp: httpx.Response = await f(*args, **kwargs)
if resp.status_code == 502:
# waking up, retry
error = "bad gateway"
if resp.status_code in (502, 503):
# waking up or SLA issue, retry
error = f"{resp.status_code} error {resp.reason_phrase}"
else:
if i > 0:
commons_logging.get_logger(__name__).debug(
Expand Down

0 comments on commit ac1834b

Please sign in to comment.