diff --git a/app/api/theia-auth/route.ts b/app/api/theia-auth/route.ts index 374c2b4..dfe1200 100644 --- a/app/api/theia-auth/route.ts +++ b/app/api/theia-auth/route.ts @@ -64,9 +64,11 @@ export async function GET(request: NextRequest) { if (result.rows.length > 0) { userEmail = result.rows[0].email; userName = result.rows[0].name; + } else { + console.log('[theia-auth] No session found for token:', sessionToken.slice(0, 8)); } - } catch { - // DB error → treat as unauthenticated + } catch (err) { + console.error('[theia-auth] DB error:', err); return redirectToLogin(request); }