From 7cfb9ada246aa980b67e7f1117526eca1ac4793b Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum Date: Wed, 18 Oct 2023 18:05:54 +0200 Subject: [PATCH] chore: improve error message in try_request.py --- dsp_permissions_scripts/utils/try_request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsp_permissions_scripts/utils/try_request.py b/dsp_permissions_scripts/utils/try_request.py index 860f3f33..5d0235ca 100644 --- a/dsp_permissions_scripts/utils/try_request.py +++ b/dsp_permissions_scripts/utils/try_request.py @@ -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