Open gabrielreisn opened 1 year ago
Got the exact same issue, any updates on this?
Yep, got the same issue here.
Same issue here, did you resolve this? I noticed in the Vercel logs, the request to the page after revalidate is a 500 error with the cache set to REVALIDATED. The next request is usually fine but sometime it isn't and returns 500 until a fresh deploy.
I'm getting this in SvelteKit as well.
For me it was because I was ignoring these warnings. Once I fixed all of these, I didn't get any issues.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://github.com/gabrielreisn/prismic-revalidate-poc
To Reproduce
Those steps to reproduce include some changes from a private CMS repo and will impact the description here
Describe the Bug
We are encountering a specific use case in which our CMS provider lacks necessary validations, necessitating us to manually implement these checks within our codebase. Our intention is to leverage on-demand Incremental Static Regeneration (ISR) to enhance the speed of content updates. However, the current behavior is problematic: post cache invalidation (whether on Vercel or localhost using next start), the application displays a 500 error page instead of serving the latest successfully built page as expected, as stated in the documentation.
According to the documentation, the anticipated behavior after cache invalidation is that the system should serve the most recent successfully built page, rather than generating a 500 error page. Unfortunately, the current implementation does not adhere to this expectation. If we attempt to return null from a page or throw an error, this also leads to a 500 error, which is perplexing based on the documentation's guidance.
Expected Behavior
Upon cache invalidation, the system should display the most recent successfully built page in line with the documentation.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel