From efa520518496f761e7a81d16c847865d5cf7ecc9 Mon Sep 17 00:00:00 2001 From: Oliver Boehlk Date: Thu, 14 May 2020 12:27:35 +0200 Subject: [PATCH] rethrow error out of promise --- bondfetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bondfetch.js b/bondfetch.js index 76183c0..4c24f6d 100644 --- a/bondfetch.js +++ b/bondfetch.js @@ -36,8 +36,8 @@ const bondFetchProcess = async (url) => { } const fetchBondData = async () => { - await bondFetchProcess(lowbonds); - await bondFetchProcess(highbonds); + await bondFetchProcess(lowbonds).catch((e) => { throw e }); + await bondFetchProcess(highbonds).catch((e) => { throw e }); setTimeout(fetchBondData, 450000); }