Skip to content
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

Inconsistent handling of notFound() from server action #69480

Open
VitaliyPotapov opened this issue Aug 30, 2024 · 0 comments
Open

Inconsistent handling of notFound() from server action #69480

VitaliyPotapov opened this issue Aug 30, 2024 · 0 comments
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@VitaliyPotapov
Copy link

Link to the code that reproduces this issue

https://github.com/VitaliyPotapov/next-reproduction-app

To Reproduce

  1. npm run dev and navigate to http://localhost:3000
  2. click Form with server action -> not-found.tsx is correctly shown
  3. click Button with server action -> there is uncaught error NEXT_NOT_FOUND

Current vs. Expected behavior

I except that click on Button with server action would show not-found.tsx.
So that handling of notFound() from server action to be consistent, no matter how I invoke that server action: via form or via click handler.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 18.20.1
  npm: 10.5.0
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.135 // Latest available version is detected (15.0.0-canary.135).
  eslint-config-next: N/A
  react: 19.0.0-rc-7771d3a7-20240827
  react-dom: 19.0.0-rc-7771d3a7-20240827
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

@VitaliyPotapov VitaliyPotapov added the bug Issue was opened via the bug report template. label Aug 30, 2024
@github-actions github-actions bot added the Runtime Related to Node.js or Edge Runtime with Next.js. label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

1 participant