diff --git a/insights/client/connection.py b/insights/client/connection.py index d6acf2ae5..e878e6231 100644 --- a/insights/client/connection.py +++ b/insights/client/connection.py @@ -572,7 +572,15 @@ def test_connection(self, rc=0): if isinstance(result, REQUEST_FAILED_EXCEPTIONS): root_cause = _exception_root_cause(result) - if isinstance(result, requests.exceptions.SSLError): + if isinstance(result, requests.exceptions.ProxyError): + proxy_url = self.proxies[urlparse(url).scheme] + if isinstance(root_cause, socket.gaierror): + logger.error(" Could not resolve proxy address %s.", proxy_url) + elif "407 Proxy Authentication Required" in str(root_cause): + logger.error(" Invalid proxy credentials %s.", proxy_url) + else: + logger.error(" Invalid proxy settings %s.", proxy_url) + elif isinstance(result, requests.exceptions.SSLError): if "[SSL: WRONG_VERSION_NUMBER]" in str(root_cause): logger.error(" Invalid protocol.") else: