Add error handling for git meta
This commit is contained in:
parent
10c7ba4240
commit
2479c151d9
@ -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 (
|
||||
<GitHubForkStatusBadgeClient {...{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user