Skip to content

Commit 858dc53

Browse files
[Dashboard] fix: Add error reason to analytics API error logs (#6034)
1 parent 8997fac commit 858dc53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/dashboard/src/@/api/analytics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export async function getUserOpUsage(
7878
});
7979

8080
if (res?.status !== 200) {
81+
const reason = await res?.text();
8182
console.error(
82-
`Failed to fetch user ops usage: ${res?.status} - ${res.statusText}`,
83+
`Failed to fetch user ops usage: ${res?.status} - ${res.statusText} - ${reason}`,
8384
);
8485
return [];
8586
}
@@ -101,8 +102,9 @@ export async function getClientTransactions(
101102
);
102103

103104
if (res?.status !== 200) {
105+
const reason = await res?.text();
104106
console.error(
105-
`Failed to fetch client transactions stats: ${res?.status} - ${res.statusText}`,
107+
`Failed to fetch client transactions stats: ${res?.status} - ${res.statusText} - ${reason}`,
106108
);
107109
return [];
108110
}

0 commit comments

Comments
 (0)