⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(web): handle unhandled promise rejection from authClient.getSession()
(justin)randoneering494f1fbc9029
diff --git a/apps/web/src/routes/_layout/_authenticated.tsx b/apps/web/src/routes/_layout/_authenticated.tsxindex 05da1002a..d9cc218dc 100644--- a/apps/web/src/routes/_layout/_authenticated.tsx+++ b/apps/web/src/routes/_layout/_authenticated.tsx@@ -4,7 +4,13 @@ import { authClient } from "@/lib/auth-client";// protects all child routes, must be logged inexport const Route = createFileRoute("/_layout/_authenticated")({beforeLoad: async ({ location }) => {- const { data: session } = await authClient.getSession();+ let session = null;+ try {+ const { data } = await authClient.getSession();+ session = data;+ } catch {+ // getSession() rejected (e.g. network error) — treat as unauthenticated+ }if (!session) {throw redirect({to: "/auth/sign-in",diff --git a/apps/web/src/routes/auth.tsx b/apps/web/src/routes/auth.tsxindex f64de56de..7c56b4d87 100644--- a/apps/web/src/routes/auth.tsx+++ b/apps/web/src/routes/auth.tsx@@ -3,7 +3,13 @@ import { authClient } from "@/lib/auth-client";export const Route = createFileRoute("/auth")({beforeLoad: async () => {- const { data: session } = await authClient.getSession();+ let session = null;+ try {+ const { data } = await authClient.getSession();+ session = data;+ } catch {+ // getSession() rejected — treat as unauthenticated, allow auth pages to render+ }if (session) {throw redirect({to: "/dashboard",