From 6763ffd6b9cc38bf576f598f28f34ea7c9abd3d7 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Sat, 21 Oct 2023 17:27:50 -0500 Subject: [PATCH] Add a catch for errors --- app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index fd51068..58fcc3e 100644 --- a/app.js +++ b/app.js @@ -305,7 +305,11 @@ async function downloader(downloads){ io.emit('dldata', url, [+i + 1,total], stats); } }); - + + await dl.start().catch(error => { + console.error('Download failed:', error); + }); + await dl.start(); if ( ! url.includes('s3.amazonaws.com')){ // Part 2 if exists repeat