Make template more resilient on initial installation

This commit is contained in:
Sam Becker 2024-09-07 16:07:17 -05:00
parent 1f8f3cf2fe
commit 63d44c35fb
2 changed files with 5 additions and 2 deletions

View File

@ -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 (
<AdminBatchEditPanelClient {...{ uniqueTags }} />
);

View File

@ -119,7 +119,10 @@ const safelyQueryPhotos = async <T>(
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;
}
}