From 0e9d38f9bbe0cde0a064fccf7bf1794316271285 Mon Sep 17 00:00:00 2001 From: Austin Mroczek Date: Mon, 23 Dec 2024 15:56:16 +0000 Subject: [PATCH] fix authentication error --- total_connect_client/client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/total_connect_client/client.py b/total_connect_client/client.py index 2a313ee..a5b82de 100644 --- a/total_connect_client/client.py +++ b/total_connect_client/client.py @@ -163,10 +163,6 @@ def _raise_for_retry(self, response): raise RetryableTotalConnectError("connection error", response) if rc == _ResultCode.FAILED_TO_CONNECT: raise RetryableTotalConnectError("failed to connect with panel", response) - if rc == _ResultCode.AUTHENTICATION_FAILED: - raise RetryableTotalConnectError( - "temporary authentication failure", response - ) if rc == _ResultCode.BAD_OBJECT_REFERENCE: raise RetryableTotalConnectError("bad object reference", response) @@ -185,6 +181,8 @@ def raise_for_resultcode(self, response): self._raise_for_retry(response) if rc == _ResultCode.BAD_USER_OR_PASSWORD: raise AuthenticationError(rc.name, response) + if rc == _ResultCode.AUTHENTICATION_FAILED: + raise AuthenticationError(rc.name, response) if rc == _ResultCode.USER_CODE_UNAVAILABLE: raise UsercodeUnavailable(rc.name, response) if rc == _ResultCode.USER_CODE_INVALID: