1
0
Fork 0

add catch block

This commit is contained in:
Ryan Mwangi 2024-10-24 15:26:50 +03:00
parent 35deb877a3
commit 08f9f5a15d
1 changed files with 3 additions and 1 deletions

View File

@ -143,8 +143,10 @@ app.get('/calendar/:name', async (req, res) => {
});
}
}
} catch (error) {
console.error(error);
res.status(500).json({ error: 'Failed to retrieve calendar data.' });
}
});
// Serve the merged calendar file