Skip to content

Commit

Permalink
Try protection.
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama committed Nov 21, 2023
1 parent ef87ee3 commit b31e0dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/(public)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ import {DrupalParagraph} from "next-drupal";
export const revalidate = 1800;

export const generateMetadata = async (): Promise<Metadata> => {
const node: BasicPage = await getResourceByPath('/');
return getNodeMetadata(node);
try {
const node: BasicPage = await getResourceByPath('/');
return getNodeMetadata(node);
}
catch (e) {
console.error(e);
return {};
}

}

const Page = async () => {
Expand Down

0 comments on commit b31e0dc

Please sign in to comment.