136979fedb
### What When submitting a server action on a page that doesn't import the action handler, a "Failed to find server action" error is thrown, even if there's a valid handler for it elsewhere. ### Why Workers for a particular server action ID are keyed by their page entrypoints, and the client router invokes the current page when triggering a server action, since it assumes it's available on the current page. If an action is invoked after the router has moved away from a page that can handle the action, then the action wouldn't run and an error would be thrown in the server console. ### How We try to find a valid worker to forward the action to, if one exists. Otherwise it'll fallback to the usual error handling. This also adds a header to opt out of rendering the flight tree, as if the action calls a `revalidate` API, then it'll return a React tree corresponding with the wrong page. Fixes #61918 Fixes #63915 Closes NEXT-2489 |
||
---|---|---|
.. | ||
.stats-app | ||
development | ||
e2e | ||
examples | ||
integration | ||
lib | ||
production | ||
unit | ||
.gitignore | ||
build-turbopack-build-tests-manifest.js | ||
build-turbopack-dev-tests-manifest.js | ||
build-turbopack-tests-manifest.d.ts | ||
get-test-filter.js | ||
jest-setup-after-env.ts | ||
ppr-tests-manifest.json | ||
readme.md | ||
test-file.txt | ||
tsconfig.json | ||
turbopack-build-tests-manifest.json | ||
turbopack-dev-examples-manifest.json | ||
turbopack-dev-tests-manifest.json |