From b83da5d89f72b355a0fd4c2a2e5e99df4c5913d1 Mon Sep 17 00:00:00 2001 From: Anand Borkar <56469274+ghostviper235@users.noreply.github.com> Date: Sat, 2 Oct 2021 14:59:12 +0530 Subject: [PATCH] Use new format for logging exceptions - api/proxy.py (#3187) --- supervisor/api/proxy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/supervisor/api/proxy.py b/supervisor/api/proxy.py index 628e9263b..51f3f81b8 100644 --- a/supervisor/api/proxy.py +++ b/supervisor/api/proxy.py @@ -122,10 +122,10 @@ class APIProxy(CoreSysAttributes): if data.get("type") != "auth_required": # Invalid protocol - _LOGGER.error( - "Got unexpected response from Home Assistant WebSocket: %s", data + raise APIError( + f"Got unexpected response from Home Assistant WebSocket: {data}", + _LOGGER.error, ) - raise APIError() # Auth session await self.sys_homeassistant.api.ensure_access_token()