You attempted to rewrite a 404 inside a static page, and this isn't allowed.
This error is from an older version of Astro and is no longer in use. If you are unable to upgrade your project to a more recent version, then you can consult unmaintained snapshots of older documentation for assistance.
InvalidRewrite404: Rewriting a 404 is only allowed inside on-demand pages.
What went wrong?
Section titled What went wrong?The user tried to rewrite a 404 page inside a static page.
Error Reference