Shopify/storefront-api-examples

Unhandled Promise - why is this happening?

Closed this issue · 1 comments

I have what is essentially boilerplate code from the node-js-buy example that works on one site (store.bubbies.com) but not another (store.cookspantry.com) The only differences are the views and the storefrontAccessToken / domain in js-buy-sdk.js On the cook's store, when I try to add an item to the cart, PM2 throws UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'id' of undefined.

This was happening because Title was not being submitted.