diff --git a/src/main.ts b/src/main.ts index 5b965fd..438bd51 100644 --- a/src/main.ts +++ b/src/main.ts @@ -188,6 +188,7 @@ const deleteNotification = async (notification: Notification) => { ); if (!response.ok) { console.error(`Could not delete notification ID: ${notification.id}`); + console.error(response.statusText); } } catch (error: any) { throw new Error(error.message); @@ -198,8 +199,8 @@ const fetchInterval = process.env.FETCH_INTERVAL ? parseInt(process.env.FETCH_INTERVAL) : 15000; +let notifications = []; const beginFetchCycle = async () => { - let notifications = []; setInterval(async () => { notifications = await getNotifications(); if (notifications.length > 0) {