Skip to content

Commit

Permalink
Merge pull request #551 from weaviate/more_exceptions
Browse files Browse the repository at this point in the history
Catch more exceptions and lower timeouts
  • Loading branch information
dirkkul authored Sep 20, 2023
2 parents 2850dcf + 7ea3ea0 commit a4ad50d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions weaviate/connect/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
JSONPayload = Union[dict, list]
Session = Union[requests.sessions.Session, OAuth2Session]
TIMEOUT_TYPE_RETURN = Tuple[NUMBERS, NUMBERS]
PYPI_TIMEOUT = 1
PYPI_TIMEOUT = 0.1


class Connection:
Expand Down Expand Up @@ -177,8 +177,8 @@ def __init__(
latest_version = pkg_info.get("version", "unknown version")
if is_weaviate_client_too_old(client_version, latest_version):
_Warnings.weaviate_client_too_old_vs_latest(client_version, latest_version)
except (RequestsConnectionError, JSONDecodeError, ReadTimeout):
pass # air-gaped environments
except requests.exceptions.RequestException:
pass # ignore any errors related to requests, it is a best-effort warning

def _create_session(self, auth_client_secret: Optional[AuthCredentials]) -> None:
"""Creates a request session.
Expand Down

0 comments on commit a4ad50d

Please sign in to comment.