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
We use fastboot for a content-focused website which is powered by a wordpress instance. Whenever content is changed we run a static build with prember & deploy the application - all good so far.
Now I noticed that if wordpress goes down (for whatever reason), and somebody visits a page, the pre-rendered page will be shown correctly, but once ember is loaded & it tries to hit the API and fails, it replaces the body with the error message.
Is there a way to basically say:
"If one of these errors is encountered, skip doing anything and just leave the HTML as it is"? Because it would be much better to just show the static page in such a scenario.
I hope I could explain my question properly 😅
I am using EXPERIMENTAL_RENDER_MODE_SERIALIZE=true, if that is relevant.
One "solution" I could think of is to return a never-resolving promise from the model hook in such a case instead of throwing an error, as I've observed that while the model hooks are pending it will not replace the content. Would that be a "good" solution or is there a better way to do this? E.g. something like that feels rather hacky:
We use fastboot for a content-focused website which is powered by a wordpress instance. Whenever content is changed we run a static build with prember & deploy the application - all good so far.
Now I noticed that if wordpress goes down (for whatever reason), and somebody visits a page, the pre-rendered page will be shown correctly, but once ember is loaded & it tries to hit the API and fails, it replaces the body with the error message.
Is there a way to basically say:
"If one of these errors is encountered, skip doing anything and just leave the HTML as it is"? Because it would be much better to just show the static page in such a scenario.
I hope I could explain my question properly 😅
I am using
EXPERIMENTAL_RENDER_MODE_SERIALIZE=true
, if that is relevant.One "solution" I could think of is to return a never-resolving promise from the model hook in such a case instead of throwing an error, as I've observed that while the model hooks are pending it will not replace the content. Would that be a "good" solution or is there a better way to do this? E.g. something like that feels rather hacky:
The text was updated successfully, but these errors were encountered: