diff --git a/balsam/client/requests_client.py b/balsam/client/requests_client.py index 902df966..5e918328 100644 --- a/balsam/client/requests_client.py +++ b/balsam/client/requests_client.py @@ -98,9 +98,13 @@ def request( except requests.Timeout as exc: logger.warning(f"Attempt Retry of Timed-out request {http_method} {absolute_url}") self.backoff(exc) - except (requests.ConnectionError, requests.HTTPError) as exc: + except requests.ConnectionError as exc: logger.warning(f"Attempt retry ({self._attempt} of {self.retry_count}) of connection: {exc}") self.backoff(exc) + except requests.HTTPError as exc: + if authenticating == False: + logger.warning(f"Attempt retry ({self._attempt} of {self.retry_count}) of connection: {exc}") + self.backoff(exc) else: try: return response.json() # type: ignore