Contentful logo

Contentful Community

Node/Express generates UnhandledPromiseRejection error

I am following the tutorial Creating an Express JavaScript application with Contentful.

In package.json I changed the Content Delivery API access token and Space ID to reflect the ones from my dashboard.

When I run npm run dev I get the error:

[nodemon] starting `node ./bin/www`
(node:11274) UnhandledPromiseRejectionWarning: #<Object>
(node:11274) 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)

Hi @oliverwilliams27,

Could you confirm what is the version utilized of both our SDKs and node itself?

Hi @gabriel,

I have just run into this same issue.

Contentful 0.26.4
Node v12.1.0

Any ideas what could be going wrong?

Thanks!