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
When a 500 error occurs, a 500 error template is served by the service worker. If there was an error message displayed on the response, the HTML is sent to the served 500 error page via BroadcastChannel:
Instead, there could be some token that is added to the template which is then replaced with the error when the service worker serves the response. There could be a token for encoding the error in an HTML attribute (for the iframe@srcdoc). Perhaps the token should be replaced with the entire populated details element, rather than just updating the iframe. We may not need to allow the markup to be modified to a large degree.
When a 500 error occurs, a 500 error template is served by the service worker. If there was an error message displayed on the response, the HTML is sent to the served 500 error page via
BroadcastChannel
:https://github.com/xwp/pwa-wp/blob/2359ae5a890e199a00b12172297dac2a6af6c7f4/wp-includes/js/service-worker-error-response-handling.js#L11-L31
However, this is not supported by browsers other than Chrome and Firefox: https://caniuse.com/#feat=broadcastchannel
We'll need to find an alternative. (Also the approach taken should be validated.)
Aside: We also need to prevent serving the 500 template when WordPress is actually rendering a response with a
500
status code, per #74.The text was updated successfully, but these errors were encountered: