This commit is contained in:
Giancarmine Salucci
2026-03-29 12:44:06 +02:00
parent 09c6f9f7c1
commit 0bf01e3057
6 changed files with 876 additions and 5 deletions

View File

@@ -24,7 +24,12 @@ import type { Handle } from '@sveltejs/kit';
try {
initializeDatabase();
} catch (err) {
console.error('[hooks.server] FATAL: database initialisation failed:', err);
process.exit(1);
}
try {
const db = getClient();
const activeProfileRow = db
.prepare<[], EmbeddingProfileEntityProps>(
@@ -46,7 +51,8 @@ try {
console.log('[hooks.server] Indexing pipeline initialised.');
} catch (err) {
console.error(
`[hooks.server] Failed to initialise server: ${err instanceof Error ? err.message : String(err)}`
'[hooks.server] Failed to initialise pipeline:',
err instanceof Error ? err.message : String(err)
);
}