You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, when a request to SCAPI returns an HTTP 503, PWA Kit renders a generic error.
There are a few ways we could implement this, but one way would be to propogate HTTP 503 errors from SCAPI calls upward to our <ErrorBoundary>.
We might then add special handling for the case where the error is a 503 to <Error>, displaying a user configurable maintenance page.
It looks like lots of the plumbing is already there – we likely need to need to a) make sure errors are passed enough b) make sure we have the details of the error to act on.
For the implementation, we'd want to test maintenance mode being enabled in a few different places:
Server side rendering
Landing on a cached page as a new visitor (eg. call to oauth2/authorize fails)
Landing on a cache page as a returning visitor with valid token (eg. catagory load fails or requests made to navigate to PLP fail)
Basket modifications from the cart page
Basket modifications from the checkout
The text was updated successfully, but these errors were encountered:
It would be cool if PWA Kit allowed displaying a "Be right back!" maintenance screen when the associated B2C Commerce instance is in maintenance mode.
B2C Commerce instances can enter maintenance mode two ways:
When B2C Commerce maintenance mode is enabled, requests to SCAPI return an HTTP 503:
https://developer.salesforce.com/docs/commerce/commerce-api/guide/response-handling.html
Today, when a request to SCAPI returns an HTTP 503, PWA Kit renders a generic error.
There are a few ways we could implement this, but one way would be to propogate HTTP 503 errors from SCAPI calls upward to our
<ErrorBoundary>
.We might then add special handling for the case where the error is a 503 to
<Error>
, displaying a user configurable maintenance page.It looks like lots of the plumbing is already there – we likely need to need to a) make sure errors are passed enough b) make sure we have the details of the error to act on.
For the implementation, we'd want to test maintenance mode being enabled in a few different places:
The text was updated successfully, but these errors were encountered: