Missing HTTP 429 handling (rate-limit / account lockout feedback) #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The app has no handler for HTTP
429 Too Many Requestsresponses. After the server introduced account lockout (5 failed logins → 15-minute lockout) and rate-limiting on critical endpoints, the user sees only a generic "Verbindung fehlgeschlagen" error instead of a meaningful message.Affected flows
/api/v1/auth/login): after 5 wrong attempts the server returns 429. The app shows a generic connection error with no hint about the lockout duration.UploadWorker.kt): retries 3× on failure but does not check for 429, so it retries immediately even when rate-limited.DownloadWorker.kt): same — no 429 detection.Expected behaviour
Retry-Afterresponse header (value = seconds to wait).Retry-Afterdelay before the next retry instead of retrying immediately.Suggested implementation location
Add a new
RateLimitInterceptorinNetworkModule.kt(afterSessionExpiredInterceptor), or extend the existing interceptor to handle 429 alongside 401.Context
Discovered during compatibility audit against server security-hardening branch (
security-hardening-2026-04). No crash or data loss — purely a UX gap.