This commit is contained in:
hailin 2025-05-20 23:24:01 +08:00
parent 41541aca05
commit 9b4e12e3bc
1 changed files with 6 additions and 1 deletions

View File

@ -121,7 +121,12 @@ export default async function Login({
const workspace = homeWorkspace[0]; // Use the first (and only) row
if (!homeWorkspace || homeWorkspace.length === 0) {
throw new Error((homeWorkspaceError as Error)?.message || "No home workspace found for this user.");
if (homeWorkspaceError) {
// If homeWorkspaceError is not null, access its message
throw new Error(homeWorkspaceError.message);
}
// Fallback message if homeWorkspaceError is null
throw new Error("No home workspace found for this user.");
}
// if (!homeWorkspace) {