Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: unhandled projects fetch errors

LAZIC Erwand8ff5e174313
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId.tsx
index f5a781d6a..23afda7cc 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/workspace/$workspaceId.tsx
@@ -10,10 +10,15 @@ export const Route = createFileRoute(
if (currentPath !== workspacePath) return;
- const projects = await context.queryClient.ensureQueryData({
- queryKey: ["projects", params.workspaceId],
- queryFn: () => getProjects({ workspaceId: params.workspaceId }),
- });
+ let projects: Awaited<ReturnType<typeof getProjects>> | undefined;
+ try {
+ projects = await context.queryClient.ensureQueryData({
+ queryKey: ["projects", params.workspaceId],
+ queryFn: () => getProjects({ workspaceId: params.workspaceId }),
+ });
+ } catch (e) {
+ return;
+ }
if (projects?.length !== 1) return;