SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
284 stars 139 forks source link

[BUG] Product Detail Pages where no product is found should 404 #1384

Closed johnboxall closed 1 year ago

johnboxall commented 1 year ago

In PWA Kit version 3.0, we appear to have regressed returning a HTTP 404: Not Found for products that don't exist:

https://pwa-kit.mobify-storefront.com/global/en-GB/product/does-not-exist https://scaffold-pwa-generated-pwa-v2.mobify-storefront.com/product/does-not-exist

In the PDP implementation, we should inspect the returned product, and if it doesn't exist, raise a 404.

bfeister commented 1 year ago

@johnboxall the two links you posted above both show the same error on my side (seen below). You're saying the link at https://scaffold-pwa-generated-pwa-v2.mobify-storefront.com/product/does-not-exist formerly (at the time you posted this) showed a 404 - Product Not Found error page?

image
vcua-mobify commented 1 year ago

Like @bfeister I am seeing the same 404 pages from both your links @johnboxall .

I also loaded up PWA Kit v2.7.3 on my local and am seeing the same page there. In the network tab, the HTTP status returned for this request is 404

Screenshot 2023-08-02 at 2 36 18 PM

vcua-mobify commented 1 year ago

I loaded up v3 on my local and I see what you mean now @johnboxall

On v3, I see an HTTP 200 and a blank PDP page

Screenshot 2023-08-02 at 2 45 58 PM

Aside, I wonder if this means https://pwa-kit.mobify-storefront.com isn't running v3?

EDIT: https://pwa-kit.mobify-storefront.com has been confirmed to be running v2. This is now switched back to v3