From 9c87fb334193de75cf871da7063f58debe092a8d Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Wed, 5 Nov 2025 06:59:25 +0000 Subject: [PATCH] completionId: cgen-265ec82eefda428d91889ceaf735a0fb cgen-265ec82eefda428d91889ceaf735a0fb --- client/contexts/AuthContext.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index f98efae8..98c7adbd 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -298,13 +298,8 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ userId: string, ): Promise => { try { - // Add 8-second timeout for profile fetch (database can be slow) - const profilePromise = aethexUserService.getCurrentUser(); - const profileTimeoutPromise = new Promise((_, reject) => - setTimeout(() => reject(new Error("Profile fetch timeout")), 8000), - ); - - const userProfile = await Promise.race([profilePromise, profileTimeoutPromise]); + // Fetch user profile - let errors happen naturally rather than with aggressive timeouts + const userProfile = await aethexUserService.getCurrentUser(); setProfile(userProfile); // Fetch roles in parallel (non-blocking) - don't await here