From b923af0ad284924c7377ab37a07225acc9936e26 Mon Sep 17 00:00:00 2001 From: Clifford Roche <1007595+cmroche@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:19:33 -0400 Subject: [PATCH] Revert "Revert "Fix aiohttp deprecation message"" --- moonraker_api/websockets/websocketclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker_api/websockets/websocketclient.py b/moonraker_api/websockets/websocketclient.py index 7755fda..b6f69b6 100644 --- a/moonraker_api/websockets/websocketclient.py +++ b/moonraker_api/websockets/websocketclient.py @@ -306,7 +306,7 @@ async def set_exception(exception: BaseException) -> None: except ClientResponseError as error: _LOGGER.warning("Websocket request error: %s", error) - if error.code == 401: + if error.status == 401: _LOGGER.error("API access is unauthorized") self.state = WEBSOCKET_STATE_STOPPING await set_exception(ClientNotAuthenticatedError)