From 0e0fb4e744d28be71befd19f7a915081bcfd0a5a Mon Sep 17 00:00:00 2001 From: Clifford Roche <1007595+cmroche@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:18:27 -0400 Subject: [PATCH] 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 b6f69b6..7755fda 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.status == 401: + if error.code == 401: _LOGGER.error("API access is unauthorized") self.state = WEBSOCKET_STATE_STOPPING await set_exception(ClientNotAuthenticatedError)