We have a Next.js
implementation on Vercel connected to Experience Edge
. We noticed that when components error out, the page that contains the component is still generated. This results in public-facing pages with chunks of missing content. Next.js builds the entire page but where the component is supposed to go is entirely blank.
Instead of considering a page valid, we instead want the page to fail validation and not generate/regenerate. At times the failure is mundane, such as the connection to Edge getting dropped momentarily. Instead of generating a half-baked version of the page, we would much prefer to keep the original copy of the page up.
Next.js
revalidation is supposed to work this way. When it experiences an error, it should not validate a page, but with the Sitecore Next.js SDK
it does.
Is it possible to skip validating a page when a component errors?
Sitecore-jss-nextjs: ^20.1.3
Next: ^12.3.3
start:production
orstart:connected
? The first on does prevent starting of rendering container with broken pages.