You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When returning notFound: false from getServerSideProps, the 404 status and page are returned, as if notFound: true was returned.
This does not occur when returning notFound: false from getStaticProps.
The obvious workaround is to only set notFound if true, but it's convenient to be able to pass along a variable to notFound, regardless of value. For example:
Additionally, the behavior should be consistent with getStaticProps.
Expected Behavior
Returning notFound: false from getServerSideProps should not result in a 404 status and page. It should render the page as expected (like returning notFound: false from getStaticProps).
To Reproduce
Return notFound: false from a page with getServerSideProps.
ambrauer
changed the title
Return notFound: false from getServerSideProps results in 404
Returning notFound: false from getServerSideProps results in 404
Feb 23, 2021
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.0.3
What version of Node.js are you using?
14.7.0
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying your application?
next dev
Describe the Bug
When returning
notFound: false
fromgetServerSideProps
, the 404 status and page are returned, as ifnotFound: true
was returned.This does not occur when returning
notFound: false
fromgetStaticProps
.The obvious workaround is to only set
notFound
if true, but it's convenient to be able to pass along a variable tonotFound
, regardless of value. For example:Additionally, the behavior should be consistent with
getStaticProps
.Expected Behavior
Returning
notFound: false
fromgetServerSideProps
should not result in a 404 status and page. It should render the page as expected (like returningnotFound: false
fromgetStaticProps
).To Reproduce
Return
notFound: false
from a page withgetServerSideProps
.The resulting page will always result in a 404.
The text was updated successfully, but these errors were encountered: