A clear and concise description of what the bug is.
yarnyarn next devThe same happens under a build/start.
Have the response be 404.
Followed: https://nextjs.org/docs/advanced-features/custom-error-page#customizing-the-error-page
https://github.com/maraisr/nextjs-repro-repo/blob/main/pages/index.js#L11
The Error component is just a React component that renders something based on properties. It does not have any magic behavior.
We're planning to add something that allows for returning "this is a 404" to getStaticProps/getServerSideProps though which should cover your use case. added this issue to my list to ping when the RFC is done for that.
Related issues:
Closing in favor of above two issues.
Most helpful comment
https://github.com/maraisr/nextjs-repro-repo/blob/main/pages/index.js#L11
The
Errorcomponent is just a React component that renders something based on properties. It does not have any magic behavior.We're planning to add something that allows for returning "this is a 404" to getStaticProps/getServerSideProps though which should cover your use case. added this issue to my list to ping when the RFC is done for that.
Related issues: