-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
global-error.tsx does not catch errors thrown during SSR #52993
Comments
Probably related to: #52573 |
Same issue for me, the |
Same issue for me, I've tried client errors or server errors but global-error.tsx doesn't work. I copied example from docs. I don't understand in switch cases global-error.tsx will work. I want to catch errors in my root layout, because I have some login there with data fetching. For another components and pages error.tsx works as expected. |
is this already fixed? I'm in |
This comment has been minimized.
This comment has been minimized.
Any progress? |
I have the same behavior in next/14.0.3-canary.2 |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 Binaries: Node: 16.19.0 npm: 8.19.3 Yarn: 1.22.19 pnpm: 8.6.2 Relevant Packages: next: 13.4.11 eslint-config-next: 13.1.0 react: 18.2.0 react-dom: 18.2.0 typescript: 4.9.4 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
https://github.com/subalee/app-playground/tree/global-err-not-working
To Reproduce
Describe the Bug
a
global-error.tsx
file existsan error is thrown inside a
fetch
function which is awaited inside a nested layout.The global error boundary does not catch the error
Expected Behavior
global-error.tsx
catches errors thrown during SSRWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: