feat: make getUserFriends throws exception

This commit is contained in:
Zamitto 2024-07-30 15:55:51 -03:00
parent 4dcd97bce8
commit f631cd3013
2 changed files with 8 additions and 16 deletions

View file

@ -13,7 +13,9 @@ const getUser = async (
try {
const [profile, friends] = await Promise.all([
HydraApi.get(`/user/${userId}`),
getUserFriends(userId, 12, 0),
getUserFriends(userId, 12, 0).catch(() => {
return { totalFriends: 0, friends: [] };
}),
]);
const recentGames = await Promise.all(