Improve error handling message

This commit is contained in:
Chocobozzz 2025-05-26 09:35:16 +02:00
parent 1570d57c79
commit ca2c6139ef
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -72,7 +72,12 @@ export function defineUploadProgram () {
await run({ ...options, url, username, password })
} catch (err) {
console.error('Cannot upload video: ' + err.message)
if (err.code === 'ECONNREFUSED') {
console.error(`Server is not responding`)
} else {
console.error('Cannot upload video: ' + err.message)
}
process.exit(-1)
}
})