diff --git a/src/pages/ContributorProfile/ContributorProfile.tsx b/src/pages/ContributorProfile/ContributorProfile.tsx index ed1b714d..9f35e05f 100644 --- a/src/pages/ContributorProfile/ContributorProfile.tsx +++ b/src/pages/ContributorProfile/ContributorProfile.tsx @@ -26,6 +26,9 @@ 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 data."); + } const userData = await userRes.json(); setProfile(userData);