From 78f7eab33cc16c71ab6a0adecca9c41034e2339f Mon Sep 17 00:00:00 2001 From: Oliver Boehlk Date: Thu, 14 May 2020 12:24:53 +0200 Subject: [PATCH] wait for error send before exit --- bondfetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bondfetch.js b/bondfetch.js index 1436ef9..76183c0 100644 --- a/bondfetch.js +++ b/bondfetch.js @@ -24,7 +24,7 @@ const bondFetchProcess = async (url) => { }); var t1 = await BondData.json(); } catch (e) { - tgBot.sendMessage(tgInfo.debugChat, `ERROR: fetching bonds:\n${e}`); + await tgBot.sendMessage(tgInfo.debugChat, `ERROR: fetching bonds:\n${e}`); throw e; } for (let data in t1) {