From 2479c151d9acf09b4b1150b2dc45c2e818e94ab6 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Thu, 30 Jan 2025 22:52:52 -0600 Subject: [PATCH] Add error handling for git meta --- src/admin/github/GitHubForkStatusBadgeServer.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/admin/github/GitHubForkStatusBadgeServer.tsx b/src/admin/github/GitHubForkStatusBadgeServer.tsx index a6cc6f3e..44bb8dc8 100644 --- a/src/admin/github/GitHubForkStatusBadgeServer.tsx +++ b/src/admin/github/GitHubForkStatusBadgeServer.tsx @@ -14,7 +14,16 @@ export default async function GitHubForkStatusBadgeServer() { label, title, isBehind, - } = await getGitHubMeta({ owner, repo }); + } = await getGitHubMeta({ owner, repo }) + .catch(() => { + console.log('Error getting GitHub meta', { owner, repo }); + return { + url: undefined, + label: undefined, + title: undefined, + isBehind: false, + }; + }); return (