diff --git a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts b/packages/twenty-front/src/modules/auth/hooks/useAuth.ts index d583e815d8eb..5646d5a2ff6c 100644 --- a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts +++ b/packages/twenty-front/src/modules/auth/hooks/useAuth.ts @@ -177,6 +177,10 @@ export const useAuth = () => { const loadCurrentUser = useCallback(async () => { const currentUserResult = await getCurrentUser(); + if (isDefined(currentUserResult.error)) { + throw new Error(currentUserResult.error.message); + } + const user = currentUserResult.data?.currentUser; if (!user) {