vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
18 stars 13 forks source link

Error at category page leads to 504 Gateway Time-out #240

Closed bloodf closed 3 years ago

bloodf commented 3 years ago

From vue-storefront created by xkekli: vuestorefront/vue-storefront#5957

Current behavior

When you have enabled alwaysSyncPlatformPricesOver in config, there is the following bug:

If your backend works with authenticated users only, an error occurs(during ssr) at line 77 https://github.com/vuestorefront/vue-storefront/blob/v1.12.2/core/modules/catalog/helpers/price/doPlatformPricesSync.ts This is happening because no token is being sent and as a result the following code does not work const { items } = await ProductService.getProductRenderList(... It does not work because response is null in this scenario.

Expected behavior

I think that there should be a check if response is an object and has a key "items".

Version of Vue Storefront

Environment details

Additional information