From e77ad561f66760b54b5630a81585794a5757c6cc Mon Sep 17 00:00:00 2001 From: Ron Klinkien Date: Tue, 29 Sep 2026 09:14:49 +0200 Subject: [PATCH] fix: don't blame the IP in login 429 messages Garmin also answers 429 based on the client fingerprint, on IPs that were never used before, so 'IP rate limited' sent users chasing IP cooldowns. Reword the mobile login and all-strategies 429 messages; exception types are unchanged. --- garminconnect/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/garminconnect/client.py b/garminconnect/client.py index f3e257e3..27882fdf 100644 --- a/garminconnect/client.py +++ b/garminconnect/client.py @@ -592,7 +592,8 @@ def resolve_mfa(name: str) -> tuple[str | None, Any]: if rate_limited_count == len(strategies): raise GarminConnectTooManyRequestsError( "All login strategies rate limited (429). " - "Try again later or check your IP/network." + "Garmin may be blocking this client or network rather than " + "rate limiting; try again later or from another network." ) raise GarminConnectConnectionError( "All login strategies exhausted: " @@ -679,7 +680,8 @@ def _do_mobile_login(self, sess: Any, email: str, password: str) -> None: if r.status_code == 429: raise GarminConnectTooManyRequestsError( - "Mobile login returned 429 — IP rate limited by Garmin" + "Mobile login returned 429 — rate limited or blocked by Garmin " + "(can be triggered by the client fingerprint, not only the IP)" ) if r.status_code == 403: