From 43bb990df5aea39fd80fdab5479f29eab89623a7 Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Wed, 26 Jul 2023 14:31:24 +0300 Subject: [PATCH] adding catch --- dist/index.js | 4 +++- src/index.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 00828af..a00248a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -38,5 +38,7 @@ class App { } } const app = new App(); -app.startCronJob(); +app.startCronJob().catch((error) => { + console.error("Error in app:", error.message); +}); // app.startWebServer(); diff --git a/src/index.ts b/src/index.ts index 31e9146..53a61d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -48,5 +48,7 @@ class App { const app = new App(); -app.startCronJob(); +app.startCronJob().catch((error) => { + console.error("Error in app:", error.message); +}); // app.startWebServer();