Skip to content

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

Merged
majd merged 2 commits into
majd:mainfrom
rudSarkar:bugfix/ratelimit
May 26, 2026
Merged

Fix 429 rate limit handling and context key type mismatch in login #480#481
majd merged 2 commits into
majd:mainfrom
rudSarkar:bugfix/ratelimit

Conversation

@rudSarkar
Copy link
Copy Markdown
Contributor

@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 from Apple with a clear error, and uses interactiveKey with a strict bool assertion in login. Prevents confusing rate-limit failures and catches context type mismatches early.

Written for commit 7c8b158. Summary will update on new commits. Review in cubic

@majd
Copy link
Copy Markdown
Owner

majd commented May 25, 2026

LGTM. Please resolve the merge conflicts so we can merge this in.

@rudSarkar
Copy link
Copy Markdown
Contributor Author

@majd fixed conflicts

@majd majd merged commit dcddce4 into majd:main May 26, 2026
14 checks passed
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.

2 participants