src/pages/404.astro file exists?Astro automatically serves the 404.astro page when no route matches, and it sends a 404 HTTP status code to inform browsers and search engines the page was not found.
src/pages/500.astro?In Astro, you set the HTTP status code by assigning to Astro.response.status inside the frontmatter script.
src/pages/404.astro with valid content, but when visiting a non-existent URL, the browser shows a blank page with no errors. What is the most likely cause?Astro requires the 404 page to be directly inside src/pages to match unmatched routes. Placing it in a subfolder prevents it from being recognized.
Astro supports error boundaries that catch errors in child components and render fallback UI, preventing the whole page from crashing.
src/pages/[slug].astro without a custom error page?[slug].astro. If this page throws an error during server rendering and no custom error page is defined, what will the HTTP status code be and what will the user see?When an error is thrown during server rendering and no custom error page exists, Astro returns a 500 status code and shows its default error page with the error details.
