Skip to content

Commit

Permalink
[Dashboard] fix: Add error reason to analytics API error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquim-verges committed Jan 22, 2025
1 parent 8997fac commit 961aa91
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/dashboard/src/@/api/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export async function getUserOpUsage(
});

if (res?.status !== 200) {
const reason = await res?.text();
console.error(
`Failed to fetch user ops usage: ${res?.status} - ${res.statusText}`,
`Failed to fetch user ops usage: ${res?.status} - ${res.statusText} - ${reason}`,
);
return [];
}
Expand All @@ -101,8 +102,9 @@ export async function getClientTransactions(
);

if (res?.status !== 200) {
const reason = await res?.text();
console.error(
`Failed to fetch client transactions stats: ${res?.status} - ${res.statusText}`,
`Failed to fetch client transactions stats: ${res?.status} - ${res.statusText} - ${reason}`,
);
return [];
}
Expand Down

0 comments on commit 961aa91

Please sign in to comment.