diff --git a/src/delta_barth/api/requests.py b/src/delta_barth/api/requests.py index a29c5d1..57b36a0 100644 --- a/src/delta_barth/api/requests.py +++ b/src/delta_barth/api/requests.py @@ -79,6 +79,8 @@ def get_sales_prognosis_data( _, status = session.relogin() if status != STATUS_HANDLER.SUCCESS and attempt == MAX_LOGIN_RETRIES: return empty_response, status + continue + break except requests.exceptions.Timeout: return empty_response, STATUS_HANDLER.pipe_states.CONNECTION_TIMEOUT except requests.exceptions.RequestException: diff --git a/src/delta_barth/constants.py b/src/delta_barth/constants.py index 4166daf..10fec1c 100644 --- a/src/delta_barth/constants.py +++ b/src/delta_barth/constants.py @@ -51,7 +51,7 @@ class KnownDelBarApiErrorCodes(enum.Enum): # ** API API_CON_TIMEOUT: Final[float] = 20.0 # secs to response -MAX_LOGIN_RETRIES: Final[int] = 1 +MAX_LOGIN_RETRIES: Final[int] = 2 # ** API response parsing # ** column mapping [API-Response --> Target-Features]