Skip to content

Fix 429 rate limit handling and context key type mismatch in login #480#481

Open
rudSarkar wants to merge 1 commit into
majd:mainfrom
rudSarkar:bugfix/ratelimit
Open

Fix 429 rate limit handling and context key type mismatch in login #480#481
rudSarkar wants to merge 1 commit into
majd:mainfrom
rudSarkar:bugfix/ratelimit

Conversation

@rudSarkar
Copy link
Copy Markdown

@rudSarkar rudSarkar commented May 20, 2026

This pull request introduces minor improvements for better code clarity and error handling. The most important changes are:

Error handling improvements:

  • Added explicit handling for HTTP 429 (Too Many Requests) responses in pkg/http/client.go, returning a clear error message when rate limited by Apple.

Code clarity:

  • Updated the loginCmd function in cmd/auth.go to use the interactiveKey constant for context value access, improving type safety and maintainability.

Summary by cubic

Adds explicit handling for HTTP 429 (Too Many Requests) from Apple with a clear error, and fixes the login context key mismatch by using the interactiveKey constant. This prevents confusing failures under rate limiting and improves type safety.

Written for commit 88922f5. Summary will update on new commits. Review in cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant