From f14f13514726ad90a17261848858ab11f5bd5c5e Mon Sep 17 00:00:00 2001 From: Bill Dirks Date: Mon, 2 Dec 2024 12:58:52 -0800 Subject: [PATCH] [CONTRIB] Handle connection error during version check (#10720) Co-authored-by: Steffen --- great_expectations/data_context/_version_checker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/great_expectations/data_context/_version_checker.py b/great_expectations/data_context/_version_checker.py index de98d7fa09b9..b410d895534d 100644 --- a/great_expectations/data_context/_version_checker.py +++ b/great_expectations/data_context/_version_checker.py @@ -54,7 +54,9 @@ def _get_latest_version_from_pypi(self) -> version.Version | None: except requests.HTTPError as http_err: logger.debug(f"An HTTP error occurred when trying to hit PyPI API: {http_err}") except requests.Timeout as timeout_exc: - logger.debug(f"Failed to hit the PyPI API due a timeout error: {timeout_exc}") + logger.debug(f"Failed to hit the PyPI API due to a timeout error: {timeout_exc}") + except requests.ConnectionError as connection_err: + logger.debug(f"Failed to hit the PyPI API due to a connection error: {connection_err}") if not response_json: return None