KEY INSIGHT: - 500 = cookie expiration (early signal, re-login immediately) - 502/503/504 = real server outage (bad gateway, service unavailable, gateway timeout) BEHAVIOR: - On 500: throw AuthenticationError → immediate re-login - On 502/503/504: preserve cache, don't re-login (server is down) - On 401/403: throw AuthenticationError → re-login This prevents unnecessary re-login attempts during actual server outages while still handling cookie expiration immediately.
9.7 KiB
9.7 KiB