Josh Story
65c832c8b8
Return client errors for unrecognized Server Actions ( #98123 )
...
## Summary
- return `400 Bad Request` when a Server Action reference ID does not
match the expected format
- return `409 Conflict` when a well-formed action ID is unavailable in
the current deployment, including deployment skew
- apply the same classification to IDs from the `Next-Action` header and
multipart MPA forms, including direct and bound actions in Node and Edge
runtimes
- return generic text bodies matching the client error category, without
exposing action-ID details
- derive marked forwarded-action responses from the original action ID
so an unexpected or mixed-version worker response cannot change the
client error semantics
Fetch actions previously had dedicated 404 handling, while equivalent
MPA form submissions fell through to the generic error path and returned
500. This removes that transport-dependent behavior and distinguishes
malformed or scanning traffic from legitimate stale clients without
treating either case as a missing page or an internal server failure.
## Verification
- `pnpm test-dev-turbo
test/e2e/app-dir/actions-unrecognized/actions-unrecognized.test.ts`
- `pnpm test-dev-turbo test/e2e/app-dir/actions/app-action.test.ts -t
'forward.*action'`
- `pnpm test-start-turbo
test/e2e/app-dir/actions-unrecognized/actions-unrecognized.test.ts`
- `pnpm test-dev-webpack
test/e2e/app-dir/actions-unrecognized/actions-unrecognized.test.ts`
- `pnpm test-dev-turbo
test/e2e/app-dir/no-server-actions/no-server-actions.test.ts`
<!-- NEXT_JS_LLM -->
2026-09-03 10:36:53 -07:00
..
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-07-24 12:00:49 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-09-03 10:36:53 -07:00
2026-07-23 23:25:55 +02:00
2026-08-21 17:37:46 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-24 11:41:05 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-09-02 19:45:27 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-06 09:53:09 +00:00
2026-05-12 13:16:31 +02:00
2026-08-21 15:07:42 +01:00
2026-05-11 13:55:47 +02:00
2026-09-01 22:27:43 -07:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-06-03 12:23:36 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-15 13:07:22 +02:00
2026-05-11 13:55:47 +02:00
2026-08-12 08:01:46 -07:00
2026-08-27 13:00:17 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-10 12:11:26 -07:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-04-30 10:01:06 +02:00
2026-06-15 23:19:53 +00:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-06-12 21:28:39 +00:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-21 22:45:12 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-02 11:33:33 -07:00
2026-06-03 12:23:36 +02:00
2026-05-11 13:55:47 +02:00
2026-07-13 09:56:16 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-14 14:29:26 +02:00
2026-08-18 10:20:11 +02:00
2026-05-26 16:50:38 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-12 13:16:31 +02:00
2026-07-24 12:00:49 +02:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-22 14:01:58 +02:00
2026-08-26 17:04:32 -07:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-10 12:11:26 -07:00
2026-07-28 17:34:04 +00:00
2026-08-11 12:05:56 +02:00
2026-08-25 18:12:50 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-06-19 14:13:33 -04:00
2026-07-07 14:02:02 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-21 22:45:12 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-13 14:50:03 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-08-19 17:57:53 +02:00
2026-07-21 18:46:47 +02:00
2026-05-22 14:01:58 +02:00
2026-05-12 13:16:31 +02:00
2026-05-12 13:16:31 +02:00
2026-07-13 06:36:36 +00:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-15 15:16:42 +00:00
2026-08-19 17:57:53 +02:00
2026-05-11 13:55:47 +02:00
2026-08-21 22:45:12 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-27 10:25:54 -04:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-07-21 19:52:09 +00:00
2026-07-21 19:52:09 +00:00
2026-08-21 22:45:12 +02:00
2026-05-22 14:01:58 +02:00
2026-07-21 17:25:13 +00:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-22 14:01:58 +02:00
2026-08-18 16:54:45 +02:00
2026-05-11 13:55:47 +02:00
2026-08-05 15:13:24 +00:00
2026-08-26 16:26:01 -04:00
2026-08-18 12:33:22 +01:00
2026-05-11 13:55:47 +02:00
2026-08-14 11:53:24 +02:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-08-20 11:57:04 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-10 15:55:29 +02:00
2026-05-12 13:16:31 +02:00
2026-06-15 15:31:02 -07:00
2026-08-27 13:00:17 +02:00
2026-06-30 01:27:24 +00:00
2026-06-30 01:27:24 +00:00
2026-05-22 14:01:58 +02:00
2026-05-22 14:01:58 +02:00
2026-05-18 09:51:36 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-21 18:46:45 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-09 16:26:18 -07:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-05-11 13:55:47 +02:00
2026-05-18 09:51:36 +02:00
2026-09-02 16:09:18 +02:00
2026-09-02 16:09:18 +02:00
2026-05-12 13:16:31 +02:00
2026-05-22 14:01:58 +02:00
2026-06-15 23:19:53 +00:00
2026-08-13 04:05:37 +02:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-05-22 14:01:58 +02:00
2026-06-16 21:29:37 +02:00
2026-08-24 18:39:28 +02:00
2026-07-08 18:02:21 +02:00
2026-06-09 17:08:03 +00:00
2026-08-05 07:41:54 +02:00
2026-05-22 14:01:58 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-05-12 13:16:31 +02:00
2026-06-15 23:19:53 +00:00
2026-08-06 09:53:09 +00:00
2026-05-11 13:55:47 +02:00
2026-05-11 13:55:47 +02:00
2026-07-21 14:54:01 -07:00
2026-05-12 13:16:31 +02:00
2026-08-20 11:57:04 +02:00
2026-07-24 12:00:49 +02:00