diff --git a/homeassistant/components/auth/indieauth.py b/homeassistant/components/auth/indieauth.py index 1437685692b..a56671c9dcd 100644 --- a/homeassistant/components/auth/indieauth.py +++ b/homeassistant/components/auth/indieauth.py @@ -6,7 +6,6 @@ from html.parser import HTMLParser from urllib.parse import urlparse, urljoin import aiohttp -from aiohttp.client_exceptions import ClientError from homeassistant.util.network import is_local @@ -81,8 +80,22 @@ async def fetch_redirect_uris(hass, url): if chunks == 10: break - except (asyncio.TimeoutError, ClientError) as ex: - _LOGGER.error("Error while looking up redirect_uri %s: %s", url, ex) + except asyncio.TimeoutError: + _LOGGER.error("Timeout while looking up redirect_uri %s", url) + pass + except aiohttp.client_exceptions.ClientSSLError: + _LOGGER.error("SSL error while looking up redirect_uri %s", url) + pass + except aiohttp.client_exceptions.ClientOSError as ex: + _LOGGER.error("OS error while looking up redirect_uri %s: %s", url, + ex.strerror) + pass + except aiohttp.client_exceptions.ClientConnectionError: + _LOGGER.error(("Low level connection error while looking up " + "redirect_uri %s"), url) + pass + except aiohttp.client_exceptions.ClientError: + _LOGGER.error("Unknown error while looking up redirect_uri %s", url) pass # Authorization endpoints verifying that a redirect_uri is allowed for use