mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-14 12:46:32 +00:00
parent
78e91e859e
commit
9ab6e80b6f
@ -57,8 +57,10 @@ class APIProxy(CoreSysAttributes):
|
|||||||
yield resp
|
yield resp
|
||||||
return
|
return
|
||||||
|
|
||||||
except HomeAssistantAPIError:
|
except HomeAssistantAuthError:
|
||||||
_LOGGER.error("Authenticate error on API for request %s", path)
|
_LOGGER.error("Authenticate error on API for request %s", path)
|
||||||
|
except HomeAssistantAPIError:
|
||||||
|
_LOGGER.error("Error on API for request %s", path)
|
||||||
except aiohttp.ClientError as err:
|
except aiohttp.ClientError as err:
|
||||||
_LOGGER.error("Client error on API %s request %s", path, err)
|
_LOGGER.error("Client error on API %s request %s", path, err)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
@ -148,11 +150,12 @@ class APIProxy(CoreSysAttributes):
|
|||||||
self.sys_homeassistant.access_token = None
|
self.sys_homeassistant.access_token = None
|
||||||
return await self._websocket_client()
|
return await self._websocket_client()
|
||||||
|
|
||||||
_LOGGER.error(
|
raise HomeAssistantAuthError()
|
||||||
"Failed authentication to Home-Assistant websocket: %s", data)
|
|
||||||
|
|
||||||
except (RuntimeError, HomeAssistantAuthError, ValueError) as err:
|
except (RuntimeError, ValueError) as err:
|
||||||
_LOGGER.error("Client error on websocket API %s.", err)
|
_LOGGER.error("Client error on websocket API %s.", err)
|
||||||
|
except HomeAssistantAuthError as err:
|
||||||
|
_LOGGER.error("Failed authentication to HomeAssistant websocket")
|
||||||
|
|
||||||
raise HTTPBadGateway()
|
raise HTTPBadGateway()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user