Skip to content

feat: handle GitHub API rate limits with user-visible feedback (#93)#404

Open
Harsh-Codes-77 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Harsh-Codes-77:feat/issue-93-v2
Open

feat: handle GitHub API rate limits with user-visible feedback (#93)#404
Harsh-Codes-77 wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
Harsh-Codes-77:feat/issue-93-v2

Conversation

@Harsh-Codes-77
Copy link
Copy Markdown
Contributor

Handle GitHub API rate limits with user-visible feedback

Implements graceful rate limit handling for GitHub API 429 responses:

  • New githubFetch wrapper utility centralizes 429 detection and throws typed RateLimitError
  • New RateLimitBanner component displays rate limit status with countdown to reset
  • Updated 4 API metrics routes to catch rate limits and return 429 responses with reset timestamp
  • Updated 4 dashboard components to detect rate limits and show banner instead of generic error

Users now get immediate, friendly feedback when hitting GitHub API limits instead of confusing error messages.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

@Harsh-Codes-77 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. Hardcoded Tailwind colors in RateLimitBanner.tsxborder-amber-500/25, bg-amber-50, text-amber-700 don't respect the theming system. Use border-[var(--warning)]/25 or var(--destructive) variants, or define a --warning CSS var.

2. Missing EOF newlines on githubFetch.ts and RateLimitBanner.tsx.

3. 403 + X-RateLimit-Remaining: 0 not handled — GitHub often returns 403 before ever sending 429 when limits are exhausted. Add detection: if response.status === 403 && response.headers.get('X-RateLimit-Remaining') === '0', treat as rate-limited.

@Priyanshu-byte-coder Priyanshu-byte-coder added level:intermediate GSSoC: Intermediate difficulty (35 pts) gssoc26 GSSoC 2026 contribution type:feature GSSoC type bonus: new feature labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution level:intermediate GSSoC: Intermediate difficulty (35 pts) type:feature GSSoC type bonus: new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants