Skip to content

Commit

Permalink
chore: improve error message in try_request.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 18, 2023
1 parent 9b064cb commit 7cfb9ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsp_permissions_scripts/utils/try_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def http_call_with_retry(action: Callable[..., requests.Response], err_msg: str)
continue
return response
except (TimeoutError, ReadTimeout, ReadTimeoutError, RequestException, ConnectionError):
print(f"{get_timestamp()}: Server Error: Retry request in {2 ** i} seconds...")
logger.error(f"Server Error: Retry request in {2 ** i} seconds...", exc_info=True)
print(f"{get_timestamp()}: SERVER ERROR: {err_msg}. Retry request in {2 ** i} seconds...")
logger.error(f"{err_msg}. Retry request in {2 ** i} seconds...", exc_info=True)
time.sleep(2**i)
continue

Expand Down

0 comments on commit 7cfb9ad

Please sign in to comment.