diff --git a/src/app/page.tsx b/src/app/page.tsx index 78fbea0b..2e1cdfc1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -27,8 +27,10 @@ export default async function HomePage({ searchParams }: PaginationParams) { photos, count, ] = await Promise.all([ - getPhotosCached({ limit }), - getPhotosCountCached(), + // Make homepage queries resilient to error + // for initial setup when database may not exist + getPhotosCached({ limit }).catch(() => []), + getPhotosCountCached().catch(() => 0), ]); const showMorePhotos = count > photos.length;