On-demand ISR and error handling #54003
Replies: 1 comment
-
I've just come across the same problem as you. I'm quite baffeled by this cache behaviour as well as it differs from how de old SSG in Page Router used to work and even what the documentation is describing. Old SSG behaviour at least would allow the website to continue working even when the backend is offline. But this new behaviour causes the website to break upon cache invalidation when the backend is offline making this app router less stable as the page router. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
According to the docs
However, this behavior seems to differ when utilizing the app router. In my project, I retrieve data from a CMS. Given that I need to perform extensive validation on my end, any exceptions I throw result in an HTTP 500 error, rather than serving the latest cached page.
I'm using Prismic CMS, and their recommendation involves setting up revalidation based on the revalidateTag. Understanding how this aspect of the cache operates can be quite confusing. Would encapsulating everything in a try-catch block work? Or does it only applies to the actual fetch request?
Beta Was this translation helpful? Give feedback.
All reactions