From 63d44c35fb8a3387f114f45b1ec5eeb8faa0e6e8 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 7 Sep 2024 16:07:17 -0500 Subject: [PATCH] Make template more resilient on initial installation --- src/admin/AdminBatchEditPanel.tsx | 2 +- src/photo/db/query.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/admin/AdminBatchEditPanel.tsx b/src/admin/AdminBatchEditPanel.tsx index 7014a5f4..9abb67da 100644 --- a/src/admin/AdminBatchEditPanel.tsx +++ b/src/admin/AdminBatchEditPanel.tsx @@ -2,7 +2,7 @@ import { getUniqueTagsCached } from '@/photo/cache'; import AdminBatchEditPanelClient from './AdminBatchEditPanelClient'; export default async function AdminBatchEditPanel() { - const uniqueTags = await getUniqueTagsCached(); + const uniqueTags = await getUniqueTagsCached().catch(() => []); return ( ); diff --git a/src/photo/db/query.ts b/src/photo/db/query.ts index 1f9cacaa..e97e633b 100644 --- a/src/photo/db/query.ts +++ b/src/photo/db/query.ts @@ -119,7 +119,10 @@ const safelyQueryPhotos = async ( throw e; } } else { - console.log(`sql get error: ${e.message} `); + if (e.message !== 'The server does not support SSL connections') { + // Avoid re-logging errors on initial installation + console.log(`sql get error: ${e.message} `); + } throw e; } }