diff --git a/chatdesk-ui/app/[locale]/setup/page.tsx b/chatdesk-ui/app/[locale]/setup/page.tsx index 7485378..06b2df8 100644 --- a/chatdesk-ui/app/[locale]/setup/page.tsx +++ b/chatdesk-ui/app/[locale]/setup/page.tsx @@ -177,6 +177,9 @@ export default function SetupPage() { const workspaces = await getWorkspacesByUserId(profile.user_id) const homeWorkspace = workspaces.find(w => w.is_home) + if (!homeWorkspace) { + throw new Error("Home workspace not found for user during setup. This should not happen.") + } const baseUrl = typeof window !== "undefined" ? `http://${window.location.hostname}:30000/v1`