From e842e6ad24f5985e6b2f3a171aaff5992e631c78 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:11:48 +0100 Subject: [PATCH] Add 901 to know authentication failures (#226) --- src/sfrbox_api/bridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sfrbox_api/bridge.py b/src/sfrbox_api/bridge.py index 4649a02..563d9f7 100644 --- a/src/sfrbox_api/bridge.py +++ b/src/sfrbox_api/bridge.py @@ -118,7 +118,7 @@ def _check_response(self, response: httpx.Response) -> XmlElement: and (code := err.get("code")) and (msg := err.get("msg")) ): - if code in {"115", "204"}: + if code in {"115", "204", "901"}: # Reset token on auth failure self._token = None raise SFRBoxAuthenticationError(f"Api call failed: [{code}] {msg}")