Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
Make template more resilient on initial installation
Browse files Browse the repository at this point in the history
  • Loading branch information
sambecker committed Sep 7, 2024
1 parent 1f8f3cf commit 63d44c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/admin/AdminBatchEditPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} />
);
Expand Down
5 changes: 4 additions & 1 deletion src/photo/db/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 63d44c3

Please sign in to comment.