throw error on bondfetch fail

This commit is contained in:
2020-05-14 12:23:23 +02:00
parent 2584c21239
commit a632d56a2f

View File

@@ -25,7 +25,7 @@ const bondFetchProcess = async (url) => {
var t1 = await BondData.json(); var t1 = await BondData.json();
} catch (e) { } catch (e) {
tgBot.sendMessage(tgInfo.debugChat, `ERROR: fetching bonds:\n${e}`); tgBot.sendMessage(tgInfo.debugChat, `ERROR: fetching bonds:\n${e}`);
console.error(e); throw e;
} }
for (let data in t1) { for (let data in t1) {
if (t1[data].interest > 0.7 && !knownBonds.includes(t1[data].id)) { if (t1[data].interest > 0.7 && !knownBonds.includes(t1[data].id)) {