fix: add error logging for various API calls across components
Deploy to VPS / deploy (push) Successful in 2m20s

This commit is contained in:
asepharyana
2026-07-26 16:34:06 +07:00
parent 74eabb7231
commit 1021301656
11 changed files with 56 additions and 51 deletions
+8 -8
View File
@@ -59,8 +59,8 @@ export function useUsers(): UseUsersReturn {
try {
const result = await dashboardApi.listUsers(20, undefined, q);
setUsers(result.data);
} catch {
// silently fail
} catch (err) {
console.error("useUsers:", err);
} finally {
setLoading(false);
}
@@ -104,8 +104,8 @@ export function useChannels(guildId: string): UseChannelsReturn {
guildId || undefined,
);
setChannels(result.data);
} catch {
// silently fail
} catch (err) {
console.error("useChannels:", err);
} finally {
setLoading(false);
}
@@ -137,8 +137,8 @@ export function useUserDetail() {
try {
const detail = await dashboardApi.getUserDetail(userId);
setUser(detail);
} catch {
// ignore
} catch (err) {
console.error("useUserDetail:", err);
} finally {
setLoading(false);
}
@@ -158,8 +158,8 @@ export function useChannelDetail() {
try {
const detail = await dashboardApi.getChannelDetail(channelId);
setChannel(detail);
} catch {
// ignore
} catch (err) {
console.error("useChannelDetail:", err);
} finally {
setLoading(false);
}