From bfbb2486e27474de9c7059cb13ebed35a2be8d24 Mon Sep 17 00:00:00 2001 From: Tenclea Date: Mon, 29 Mar 2021 15:22:39 +0200 Subject: [PATCH] Handle promise errors --- .gitignore | 1 + utils/proxy-scrapper.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b4b6a8f6..e4a8db2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .eslintrc.json +.dccache *.bak \ No newline at end of file diff --git a/utils/proxy-scrapper.js b/utils/proxy-scrapper.js index c600739a..d41cc03b 100644 --- a/utils/proxy-scrapper.js +++ b/utils/proxy-scrapper.js @@ -23,5 +23,5 @@ module.exports = async () => { return res.split(/\r?\n/).filter(p => p !== ''); }); - return await Promise.all(scrapped).then(values => values.reduce((a, b) => a.concat(b), [])); + return await Promise.all(scrapped).then(values => values.reduce((a, b) => a.concat(b), [])).catch(e => logger.error(e)); }; \ No newline at end of file