Skip to content

missing HTTP response validation in the profile fetch logic#650

Open
annrose2277-glitch wants to merge 1 commit into
GitMetricsLab:mainfrom
annrose2277-glitch:feat
Open

missing HTTP response validation in the profile fetch logic#650
annrose2277-glitch wants to merge 1 commit into
GitMetricsLab:mainfrom
annrose2277-glitch:feat

Conversation

@annrose2277-glitch
Copy link
Copy Markdown

Related Issue


Description

This PR resolves a critical bug where the application would silently fail or crash if the GitHub API returned a non-200 response (such as a 404 for a missing user). Added an if (!userRes.ok) check to validate the HTTP response status before attempting to parse the JSON.


How Has This Been Tested?

  • Ran the local development server.
  • Searched for a valid GitHub username to ensure the profile loads correctly.
  • Searched for an invalid GitHub username to verify the app throws the error gracefully instead of crashing the UI.

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 1, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit d25e458
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a1d04e2dcca69000817db17
😎 Deploy Preview https://deploy-preview-650--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Warning

Review limit reached

@annrose2277-glitch, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2d932a96-c8cd-4544-b5ab-912cb510371a

📥 Commits

Reviewing files that changed from the base of the PR and between 53f820b and d25e458.

📒 Files selected for processing (1)
  • src/pages/ContributorProfile/ContributorProfile.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Missing HTTP Response Status Check

1 participant