completionId: cgen-8fad880b65dd4d46bff93913659dcc24

cgen-8fad880b65dd4d46bff93913659dcc24
This commit is contained in:
Builder.io 2025-11-13 03:54:56 +00:00
parent 2f5086e3ba
commit c5f6952b19

View file

@ -320,10 +320,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
userId: string,
): Promise<AethexUserProfile | null> => {
try {
// Fetch user profile with a 3-second timeout to prevent hanging
// Fetch user profile with a 10-second timeout to prevent hanging
const profilePromise = aethexUserService.getCurrentUser();
const timeoutPromise = new Promise<null>((resolve) =>
setTimeout(() => resolve(null), 3000),
setTimeout(() => resolve(null), 10000),
);
const userProfile = await Promise.race([profilePromise, timeoutPromise]);