From f578a7d31bece083f9f4c36c4e249fe8693c997c Mon Sep 17 00:00:00 2001 From: KaKi87 Date: Tue, 12 Jul 2022 17:01:25 +0200 Subject: [PATCH] :loud_sound: Add global error catching & logging --- main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.js b/main.js index 7657be2..4c347dc 100644 --- a/main.js +++ b/main.js @@ -19,6 +19,16 @@ const { intents: ['directMessages'] } ); +fastify.addHook( + 'onError', + error => console.error(error) +); + +eris.on( + 'error', + error => console.error(error) +); + let url, nextRequestTimestamp,