From fa2dd50beb6a6b9f82dd57fa6ae5dc4cb1007ac5 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Wed, 2 Oct 2024 02:09:36 +0300 Subject: [PATCH] filter out failed requests --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index c216cfc..d7bdf21 100644 --- a/server.js +++ b/server.js @@ -37,6 +37,8 @@ app.post('/merge', async (req, res) => { }); const results = await Promise.all(promises); + // Filter out any failed requests + const validResults = results.filter((result) => result !== null); // Parse calendar data const cal1 = ical.parseICS(cal1Data.data);