1
0
Fork 0

filter out any failed requests

This commit is contained in:
Ryan Mwangi 2024-10-24 15:28:13 +03:00
parent 08f9f5a15d
commit d2d0f7fd1e
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,10 @@ app.get('/calendar/:name', async (req, res) => {
return null;
});
});
const results = await Promise.all(promises);
// Filter out any failed requests
const validResults = results.filter((result) => result !== null);
}
}
} catch (error) {