How to use custom page when get 500 error?

Hi,
I have a custom page for error 500. How to make it work?
I get quite often “Internal Server Error”, I haven’t found the cause of the error and I need to show some nice page.
Any suggestion?

Hi @vova.champion. In order to help you we would need more info. Can you share a repo of the project as well as the WP endpoint you are using to get the data?

Most probably an error 500 is some data from the endpoint missing inside a React component that is making your app crash.

Hi @orballo!
Thanks for the answer.
Unfortunately I cannot share the repo, it’s a custom page with footer/header and menu from WP

beforeSSR: async ({ state, actions }) => {
    await Promise.all([
      state.theme.templates.map((slug) => {
        return (
          actions.source.fetch(`/wp-template-part/${slug}`) &&
          actions.source.fetch(`/template-part/${slug}`)
        );
      }),
      actions.source.fetch(`/menu/${state.theme.menuUrl}/`),
    ]);
  },

But is there a way not getting empty page with “Internal Server Error”? :slightly_smiling_face: