-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Preflight request failures should not block navigation #34199
Comments
Does this just mean to ignore the error completely, or give a way to control what to do by like a flag or a callback? |
@nkzawa we shouldn't ignore the error per se, we should treat this us being unable to navigate client-side similar to when we fail to load a JS bundle or |
fixes #34199 Also fixes response code to return `500` when showing error page of preflight request failure on dev mode ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
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. |
When the Next.js application shows a
Link
to a route that holds a middleware in its routing path, we run what is called a "preflight" request. This is intended to know how the client should behave when navigating to that location. This points to the bundle that should be preload, the redirection target if any, etc.Currently, when this request fails, the client is no longer able to navigate and clicking the
Link
would just not work. In such cases, the client should control the error and instead perform a hard navigation to the link once it is clicked.The text was updated successfully, but these errors were encountered: