mirror of https://github.com/calzoneman/sync.git
ffmpeg: better error messages for ECONNREFUSED and ENOTFOUND
This commit is contained in:
parent
d0c1e8cbd9
commit
8a8ed0a932
|
@ -123,6 +123,12 @@ function testUrl(url, cb, redirCount) {
|
|||
cb("The remote server provided an invalid SSL certificate. Details: "
|
||||
+ err.reason);
|
||||
return;
|
||||
} else if (err.code === 'ENOTFOUND') {
|
||||
cb(`Unknown host "${err.hostname}". Please check that the link is correct.`);
|
||||
return;
|
||||
} else if (err.code === 'ECONNREFUSED') {
|
||||
cb("The remote server refused the connection. Please check that the link is correct.");
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.error("Error sending preflight request: %s (link: %s)", err.message, url);
|
||||
|
|
Loading…
Reference in New Issue