From 0678c26627aea32652ba461c11a2b8d78d120b15 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 27 May 2023 15:24:08 -0500 Subject: [PATCH] Fix:Catch exception when podcast episode download request fails #1759 --- server/utils/ffmpegHelpers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/utils/ffmpegHelpers.js b/server/utils/ffmpegHelpers.js index b82f9784..9cde93b1 100644 --- a/server/utils/ffmpegHelpers.js +++ b/server/utils/ffmpegHelpers.js @@ -95,7 +95,12 @@ module.exports.downloadPodcastEpisode = (podcastEpisodeDownload) => { method: 'GET', responseType: 'stream', timeout: 30000 + }).catch((error) => { + Logger.error(`[ffmpegHelpers] Failed to download podcast episode with url "${podcastEpisodeDownload.url}"`, error) + return null }) + if (!response) return resolve(false) + const ffmpeg = Ffmpeg(response.data) ffmpeg.outputOptions(