Server action - Internal error not handled if middleware is used Server action does not finish request on file size exceeded error #73037
Labels
bug
Issue was opened via the bug report template.
Middleware
Related to Next.js Middleware.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/liri2006/next-file-upload-issue
To Reproduce
Current vs. Expected behavior
Expected:
Error is returned to the client.
Actual:
Request is in permanent "pending" state, so form submit never ends. Error is printed in server logs though .
Provide environment information
Which area(s) are affected? (Select all that apply)
Middleware, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), Vercel (Deployed)
Additional context
Works as expected if middleware file is deleted.
The text was updated successfully, but these errors were encountered: