Skip to content

UnhandledPromiseRejectionWarning #2

Description

@jc21

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions