We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 766e195 commit 5e9454bCopy full SHA for 5e9454b
1 file changed
client/src/app/profile/[userId]/page.tsx
@@ -24,6 +24,7 @@ const profileFetcher = async (url: string): Promise<UserProfile> => {
24
credentials: "include",
25
})
26
27
+ if (response.status === 404) throw new Error("Profile not found")
28
if (!response.ok) throw new Error("Failed to fetch data")
29
const payload: unknown = await response.json()
30
if (typeof payload !== "object" || Array.isArray(payload))
0 commit comments