From 08a42f67397ba4983caf8cc7e666888ccd42736e Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 22 Jul 2017 11:32:43 -0700 Subject: [PATCH] ffmpeg: add specific error for invalid SSL cert --- src/ffmpeg.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ffmpeg.js b/src/ffmpeg.js index 6c39ec71..7e311ad2 100644 --- a/src/ffmpeg.js +++ b/src/ffmpeg.js @@ -119,6 +119,12 @@ function testUrl(url, cb, redirCount) { }); req.on("error", function (err) { + if (/hostname\/ip doesn't match/i.test(err.message)) { + cb("The remote server provided an invalid SSL certificate. Details: " + + err.reason); + return; + } + LOGGER.error("Error sending preflight request: %s (link: %s)", err.message, url); cb("An unexpected error occurred while trying to process the link. " + "Try again, and contact support for further troubleshooting if the " +