From d25e4588cd55ef727a31d9fd3e863c075794955a Mon Sep 17 00:00:00 2001 From: Ann Rose Date: Mon, 1 Jun 2026 09:33:26 +0530 Subject: [PATCH] missing HTTP response validation in the profile fetch logic --- src/pages/ContributorProfile/ContributorProfile.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ContributorProfile/ContributorProfile.tsx b/src/pages/ContributorProfile/ContributorProfile.tsx index ed1b714d..bbb40e52 100644 --- a/src/pages/ContributorProfile/ContributorProfile.tsx +++ b/src/pages/ContributorProfile/ContributorProfile.tsx @@ -26,6 +26,7 @@ export default function ContributorProfile() { try { const userRes = await fetch(`https://api.github.com/users/${username}`); + if (!userRes.ok) throw new Error("Failed to fetch user profile"); const userData = await userRes.json(); setProfile(userData);