From 12a71d398025ddf811bb80193b285d635bb60843 Mon Sep 17 00:00:00 2001 From: teddit Date: Sat, 5 Dec 2020 21:34:08 +0100 Subject: [PATCH] add catches --- inc/commons.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/commons.js b/inc/commons.js index 84ce95c..e905f81 100644 --- a/inc/commons.js +++ b/inc/commons.js @@ -8,6 +8,8 @@ module.exports = function(request, fs) { resolve({ success: false, data: null }) } }) + }).catch((err) => { + console.log(`Downloading media file failed for unknown reason. Details:`, err) }) } @@ -20,6 +22,8 @@ module.exports = function(request, fs) { resolve({ success: false }) } }) + }).catch((err) => { + console.log(`Writing media file to disk failed for unknown reason. Details:`, err) }) }