We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f7a223 commit 13cd63cCopy full SHA for 13cd63c
src/client/app/api/user/data/route.js
@@ -15,8 +15,8 @@ export const GET = withAuth(async function GET(request, { authHeader }) {
15
cache: "no-store" // Prevent Next.js from caching this server-side fetch
16
})
17
18
+ const data = await response.json()
19
if (!response.ok) {
- const data = await response.json()
20
throw new Error(
21
data.message || "Failed to fetch user data from backend"
22
)
@@ -32,4 +32,4 @@ export const GET = withAuth(async function GET(request, { authHeader }) {
32
{ status: 500 }
33
34
}
35
-})
+})
0 commit comments