-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unstable_revalidate errors when returning notFound: true #34809
Comments
Hi, this looks like a bug as we shouldn't be considering returning |
Thanks 👍 |
Hi, this should be updated in |
I checked version
Can I help somehow? |
@ramiel is this specifically not working when revalidating and returning |
I first updated to the canary version because of the 404 problem. I just want to tell that the problem is not solved with that version. Nonetheless I'm seeing the error in all the calls I do, but it's difficult to understand what's happening because the error message is not helpful. Maybe the original error shouldn't be replaced with that generic text? |
Ok, because this definitely doesn't happen to me on localhost (dev or production mode), but this definitely happens on production on vercel. I'll monitor that issue, thanks. But just to understand: do you know there's a problem in some configurations/hosts? |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What is the improvement or update you wish to see?
Please, describe in the documentation how to remove a page that returns 404.
Is there any context that might help us understand?
Suppose i have the page /pages/post/[slug].tsx with
getStaticProps
and getStaticPaths
And also i have an api route: /api/wordpress/revalidate:
From client side i can click "Delete post". After clicking the button, the post is deleted in Wordpress.
When I delete a post in Wordpress I call this api route /api/wordpress/revalidate?secret=&slug=some_slug, but I am getting an error "Failed to revalidate /post/some_slug".
This happens because {notFound: true } is returned from getStaticProps
next.js/packages/next/server/api-utils/node.ts
Lines 310 to 324 in 3d5dd58
and res.ok = false
Please, describe in the documentation how to delete /pages/post/some_slug?
Does the docs page already exist? Please link to it.
https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta
The text was updated successfully, but these errors were encountered: