You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start dev ( next dev or npm run dev or bun run dev )
Click Send it
Nothing happens
Current vs. Expected behavior
Current
Blocked by middleware, but no value is returned and try / catch, then / catch doesn't work either
Expected behavior
I thought that even if server actions are used, if they are blocked by middlware ex) NextResponse.json( ... ), there will be some kind of response so that it can be handled on the client side.
Provide environment information
Operating System:
Platform: linux
Arch: arm64
Version: #1 SMP PREEMPT_DYNAMIC Wed Dec 13 18:13:24 UTC 2023
Available memory (MB): 23663
Available CPU cores: 4
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.1.1-canary.71 // Latest available version is detected (14.1.1-canary.71).
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/YellaGoya/middlware-response-handle-nextjs-issue-reproduction
To Reproduce
next dev
ornpm run dev
orbun run dev
)Send it
Current vs. Expected behavior
Current
Blocked by middleware, but no value is returned and try / catch, then / catch doesn't work either
Expected behavior
I thought that even if server actions are used, if they are blocked by middlware
ex) NextResponse.json( ... )
, there will be some kind of response so that it can be handled on the client side.Provide environment information
Operating System: Platform: linux Arch: arm64 Version: #1 SMP PREEMPT_DYNAMIC Wed Dec 13 18:13:24 UTC 2023 Available memory (MB): 23663 Available CPU cores: 4 Binaries: Node: 20.10.0 npm: 10.2.3 Yarn: N/A pnpm: N/A Relevant Packages: next: 14.1.1-canary.71 // Latest available version is detected (14.1.1-canary.71). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: