Skip to content

fix: display user-friendly UI for GitHub API rate limit errors (#72) - #73

Merged
arnabnandy7 merged 8 commits into
arnabnandy7:mainfrom
GowsiSM:fix/rate-limit-error-ui
Sep 3, 2026
Merged

arnabnandy7 merged 8 commits into
arnabnandy7:mainfrom
GowsiSM:fix/rate-limit-error-ui

Conversation

@GowsiSM

@GowsiSM GowsiSM commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This PR replaces the raw GitHub API rate limit error JSON with a user-friendly error UI.

Changes

  • Added a reusable ErrorCard component with warning and error variants
  • Added GitHub API rate limit detection
  • Added structured rate limit error responses
  • Added retry functionality
  • Added a "Sign in for higher limits" action for unauthenticated users
  • Added collapsible technical details for debugging
  • Added light and dark theme support

Closes #72

- Add RateLimitError class and isRateLimitError helper function
- Detect GitHub API 403 errors with rate limit messaging
- Structure error responses with rateLimit and retryAfter fields
- Add rateLimit and retryAfter to SearchResponse type
- Support warning and destructive variants with collapsible technical details
- Buttons for retry and sign-in
- Replace raw JSON error display with ErrorCard in searchsummary
- Add rateLimitInfo state and retry handler
- Show sign-in prompt for unauthenticated users

Closes #72
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

@GowsiSM is attempting to deploy a commit to the arnabnandy7's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openissue-dev Ready Ready Preview Sep 3, 2026 3:01pm UTC

@arnabnandy7 arnabnandy7 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Some points to look into.

@arnabnandy7

Copy link
Copy Markdown
Owner

Also sonar coverage dropped

ERROR: Coverage for branches (91.43%) does not meet global threshold (92%)
Error: Process completed with exit code 1.

@arnabnandy7 arnabnandy7 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Found two issues also check the test coverage, it's not reaching 92% which is our repo's standard.

…er provided cooldown

- Fall back to ratelimit reset when retry-after is absent
- Bind "Try again" to the operation that actually failed
- Remove "Sign in for higher limits" action
- Disable retry during server-provided cooldown
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@arnabnandy7

Copy link
Copy Markdown
Owner

Thanks for your contribution @GowsiSM

@arnabnandy7
arnabnandy7 merged commit 54a840e into arnabnandy7:main Sep 3, 2026
2 of 3 checks passed
@arnabnandy7 arnabnandy7 added the bug Something isn't working label Sep 3, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Completed in Open issue portal development Sep 3, 2026
@arnabnandy7 arnabnandy7 added this to the 1.2.0 milestone Sep 3, 2026
@GowsiSM

GowsiSM commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for sticking with me through all the review iterations and pushing these improvements through, @arnabnandy7 !

The cooldown updates and request ID protection make the rate limit handling way more robust.

This branch was successfully deployed

1 active deployment
Preview — 5e7c4e3f Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

UX Improvement: Display a user-friendly message for GitHub API rate limit errors instead of raw JSON

2 participants