diff --git a/src/app/og/all/page.tsx b/src/app/og/all/page.tsx index 27c1523d..56306e24 100644 --- a/src/app/og/all/page.tsx +++ b/src/app/og/all/page.tsx @@ -12,7 +12,8 @@ export default async function OGPage() { photos, count, ] = await Promise.all([ - getPhotosCached({ limit: INFINITE_SCROLL_GRID_PHOTO_INITIAL }), + getPhotosCached({ limit: INFINITE_SCROLL_GRID_PHOTO_INITIAL }) + .catch(() => []), getPhotosMeta() .then(({ count }) => count) .catch(() => 0), diff --git a/src/app/og/sample/page.tsx b/src/app/og/sample/page.tsx index 3c9545a6..f00670d4 100644 --- a/src/app/og/sample/page.tsx +++ b/src/app/og/sample/page.tsx @@ -22,13 +22,20 @@ export default async function OGOverviewPage() { photosSimulation, photosFocal, ] = await Promise.all([ - getPhotosCached({ limit: 1 }).then(photos => photos[0]), - getPhotosCached({ limit: 1, camera: cameraIcon }).then(photos => photos[0]), - getPhotosCached({ limit: 1, tag }), - getPhotosCached({ limit: 1, tag: TAG_FAVS }), - getPhotosCached({ limit: 1, camera }), - getPhotosCached({ limit: 1, simulation }), - getPhotosCached({ limit: 1, focal }), + getPhotosCached({ limit: 1 }).then(photos => photos[0]) + .catch(() => undefined), + getPhotosCached({ limit: 1, camera: cameraIcon }).then(photos => photos[0]) + .catch(() => undefined), + getPhotosCached({ limit: 1, tag }) + .catch(() => []), + getPhotosCached({ limit: 1, tag: TAG_FAVS }) + .catch(() => []), + getPhotosCached({ limit: 1, camera }) + .catch(() => []), + getPhotosCached({ limit: 1, simulation }) + .catch(() => []), + getPhotosCached({ limit: 1, focal }) + .catch(() => []), ]); return (