Skip to content

Commit

Permalink
Add a bit of error handling for failed contributors fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Jan 22, 2025
1 parent ca4f05b commit b70958a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/docs/src/components/Contributors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ const getAllContributors = async (url: URL) => {
},
});
if (!response.ok) {
console.error('GitHub API request failed:');
console.log(await response.text());
return [];
}
const contributors = await response.json();
allContributors.push(...contributors);
Expand Down

0 comments on commit b70958a

Please sign in to comment.