Add a .catch to shared router for ssg fetching. (#47265)
**Description:** I noticed that when a user is on a deployed next.js site, and a fresh deployment is made, requests for ssg data fails w/ a 404. For prefetches (hovering a link) this appears to be handled well, but when the user actually clicks the link it wasn't being handled. This doesn't seem to be a problem as the page still behaves as expected, but the errors being generated are clogging sentry. To fix this, I added a simple `.catch(() => false)` as the return value didn't appear to be used at all. I was able to verify that this works correctly by patching next in a local project and deploying a few times then clicking around. **Issues** As far as I know there's no issue tracking this atm as I chatted w/ Tim in slack and he was under the impression that all of the failures were caught. Console on page navigation before this change: <img width="775" alt="image" src="https://user-images.githubusercontent.com/4172067/226069042-afa3a23b-b575-4e81-8ec4-ac887e38444d.png"> --------- Co-authored-by:JJ Kasper <jj@jjsweb.site>
Showing
Please
register
or
sign in
to comment