chore: update start script in package.json and adjust Svelte adapter configuration for improved deployment flexibility

This commit is contained in:
Rotimi Best
2026-05-19 08:15:35 +01:00
parent 65962b49d5
commit 86ebe9ef62
6 changed files with 27 additions and 9 deletions
+7 -1
View File
@@ -54,7 +54,13 @@ export const app = new Hono()
)
.use('*', rateLimiter)
.use('*', async (c, next) => {
const session = await auth.api.getSession({ headers: c.req.raw.headers });
let session: Awaited<ReturnType<typeof auth.api.getSession>> | null = null;
try {
session = await auth.api.getSession({ headers: c.req.raw.headers });
} catch (error) {
console.error('auth.api.getSession error:', error);
}
if (!session) {
c.set('user', null);