From 87d267a1c3fad32f3773df02bb04c7d98dc9cc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Thu, 8 Jan 2026 15:22:20 +0100 Subject: [PATCH] static import and error catching --- app/server/modules/lifecycle/startup.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/server/modules/lifecycle/startup.ts b/app/server/modules/lifecycle/startup.ts index 9b8ccfb6..30619cdb 100644 --- a/app/server/modules/lifecycle/startup.ts +++ b/app/server/modules/lifecycle/startup.ts @@ -13,6 +13,7 @@ import { repositoriesService } from "../repositories/repositories.service"; import { notificationsService } from "../notifications/notifications.service"; import { VolumeAutoRemountJob } from "~/server/jobs/auto-remount"; import { cache } from "~/server/utils/cache"; +import { initAuth } from "~/lib/auth"; const ensureLatestConfigurationSchema = async () => { const volumes = await db.query.volumesTable.findMany({}); @@ -50,8 +51,10 @@ export const startup = async () => { logger.error(`Error ensuring restic passfile exists: ${err.message}`); }); - const { initAuth } = await import("~/lib/auth"); - await initAuth(); + await initAuth().catch((err) => { + logger.error(`Error initializing auth: ${err.message}`); + throw err; + }); await ensureLatestConfigurationSchema();