From bf8ce092af2b0a5a684104e97df1de389d8db520 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 5 Mar 2026 18:25:31 +0100 Subject: [PATCH] Fix --- web/pages/[username]/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/pages/[username]/index.tsx b/web/pages/[username]/index.tsx index d785d7a3..0f9c0d6b 100644 --- a/web/pages/[username]/index.tsx +++ b/web/pages/[username]/index.tsx @@ -28,7 +28,12 @@ import {isNativeMobile} from 'web/lib/util/webview' import Custom404 from '../404' async function getUserAndProfile(username: string) { - return await unauthedApi('get-user-and-profile', {username}) + try { + return await unauthedApi('get-user-and-profile', {username}) + } catch (e) { + console.error('Error in getUserAndProfile:', e) + } + return {profile: null, user: null} } // getServerSideProps is a Next.js function that can be used to fetch data and render the contents of a page at request time.