mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 21:09:17 -06:00
Better 413 error handling in cli script
This commit is contained in:
parent
4dfd57ae6f
commit
743dab5517
@ -63,7 +63,13 @@ async function run (url: string, username: string, password: string) {
|
||||
console.log(`Video ${options.videoName} uploaded.`)
|
||||
process.exit(0)
|
||||
} catch (err) {
|
||||
const message = err.message || ''
|
||||
if (message.includes('413')) {
|
||||
console.error('Aborted: the video file you try to upload it too big for this PeerTube instance.')
|
||||
} else {
|
||||
console.error(require('util').inspect(err))
|
||||
}
|
||||
|
||||
process.exit(-1)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user