tmdb-cli
tmdb-cli copied to clipboard
UnhandledPromiseRejectionWarning
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.
I have the same issue, using the same tmdb version.
Maybe something changed in the API response?
I'll investigate as soon as I can