forked from ryanmwangi/CalMerger
filter out any failed requests
This commit is contained in:
parent
08f9f5a15d
commit
d2d0f7fd1e
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue