Skip to content

Commit

Permalink
fix authentication error
Browse files Browse the repository at this point in the history
  • Loading branch information
austinmroczek committed Dec 23, 2024
1 parent 780c08d commit 0e9d38f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions total_connect_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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:
Expand Down

0 comments on commit 0e9d38f

Please sign in to comment.