diff --git a/packages/website/app/api/og/route.tsx b/packages/website/app/api/og/route.tsx index 6e636a31b..cb907255b 100644 --- a/packages/website/app/api/og/route.tsx +++ b/packages/website/app/api/og/route.tsx @@ -11,6 +11,9 @@ const getGoogleFontUrl = (fontFamily: string, weight: number) => const fetchFont = async (fontFamily: string, weight: number) => { const cssUrl = getGoogleFontUrl(fontFamily, weight); const cssResponse = await fetch(cssUrl); + if (!cssResponse.ok) { + throw new Error(`Failed to fetch font CSS: ${cssResponse.status}`); + } const cssText = await cssResponse.text(); const fontUrlMatch = cssText.match(/src: url\(([^)]+)\)/); @@ -20,6 +23,9 @@ const fetchFont = async (fontFamily: string, weight: number) => { const fontUrl = fontUrlMatch[1]; const fontResponse = await fetch(fontUrl); + if (!fontResponse.ok) { + throw new Error(`Failed to fetch font: ${fontResponse.status}`); + } return fontResponse.arrayBuffer(); }; diff --git a/packages/website/app/blog/agent/page.tsx b/packages/website/app/blog/agent/page.tsx index 414f7c311..cfdb86ca0 100644 --- a/packages/website/app/blog/agent/page.tsx +++ b/packages/website/app/blog/agent/page.tsx @@ -497,7 +497,6 @@ const AgentPage = () => { with the agents that exist. If your tool has a CLI or an API, you can add a provider.

-

If your tool has a CLI or an API, you can add a provider.

diff --git a/packages/website/app/changelog/page.tsx b/packages/website/app/changelog/page.tsx index c9e019952..d52f1960c 100644 --- a/packages/website/app/changelog/page.tsx +++ b/packages/website/app/changelog/page.tsx @@ -39,9 +39,13 @@ export const metadata: Metadata = { }; const getChangelog = () => { - const changelogPath = join(process.cwd(), "..", "react-grab", "CHANGELOG.md"); - const content = readFileSync(changelogPath, "utf-8"); - return parseChangelog(content); + try { + const changelogPath = join(process.cwd(), "..", "react-grab", "CHANGELOG.md"); + const content = readFileSync(changelogPath, "utf-8"); + return parseChangelog(content); + } catch { + return []; + } }; const ChangelogPage = () => {