diff --git a/index.js b/index.js index 0caf710..f9f5c28 100644 --- a/index.js +++ b/index.js @@ -71,8 +71,12 @@ init(); async function getAllUsersStatus() { for (let i = 0; i < usernames.length; i++) { - const userData = await getUserStatus(usernames[i].name, usernames[i].id); - usernames[i] = { ...usernames[i], ...userData }; + try { + const userData = await getUserStatus(usernames[i].name, usernames[i].id); + usernames[i] = { ...usernames[i], ...userData }; + } catch (error) { + console.error(error); + } if (i === usernames.length - 1) { console.log("Successfully updated all users"); }