(node:6230) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: /Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/bin/youtube-dl --dump-json --format=22 http://www.youtube.com/watch?v=WRz2MxhAdJo at makeError (/Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/node_modules/execa/lib/error.js:56:11) at handlePromise (/Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/node_modules/execa/index.js:114:26) at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:6230) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:6230) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
Instead of throwing error, it's just printing this on console even when I try it inside try catch plus there's no way to check formats before trying to download.
(node:6230) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: /Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/bin/youtube-dl --dump-json --format=22 http://www.youtube.com/watch?v=WRz2MxhAdJo at makeError (/Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/node_modules/execa/lib/error.js:56:11) at handlePromise (/Users/abhikhatri/Documents/Experiments/ytdl-server/node_modules/youtube-dl/node_modules/execa/index.js:114:26) at processTicksAndRejections (internal/process/task_queues.js:93:5) (node:6230) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:6230) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
Instead of throwing error, it's just printing this on console even when I try it inside try catch plus there's no way to check formats before trying to download.