tmdb-cli icon indicating copy to clipboard operation
tmdb-cli copied to clipboard

UnhandledPromiseRejectionWarning

Open jc21 opened this issue 7 years ago • 2 comments

Nodejs version: v10.10.0 tmdb version: 0.2.0 OS: Centos 7

$ tmdb "Star Wars"
✖ Loading the list
(node:122252) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token < in JSON at position 0
    at parse (<anonymous>)
    at got.then.response (/usr/lib/node_modules/tmdb-cli/index.js:219:16)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:122252) 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:122252) [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.

The crux of the problem is probably the response. I think the project would benefit by having another flag to debug the requests and responses to the api as well.

jc21 avatar Sep 20 '18 01:09 jc21

I have the same issue, using the same tmdb version.

Maybe something changed in the API response?

ildave avatar Sep 24 '19 08:09 ildave

I'll investigate as soon as I can

rawnly avatar Sep 26 '19 14:09 rawnly