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

Nested route ErrorBoundaries can cause "Unexpected Server Error" during SSR, if error is thrown below Outlet #9609

Open
nramovs-sr opened this issue Jun 12, 2024 · 0 comments

Comments

@nramovs-sr
Copy link

Reproduction

Go to https://stackblitz.com/edit/remix-run-remix-e3e3jp

Click link (child HAS boundary) Throw below outlet (crash)

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @remix-run/dev: * => 2.9.2 
    @remix-run/node: * => 2.9.2 
    @remix-run/react: * => 2.9.2 
    @remix-run/serve: * => 2.9.2 
    vite: ^5.1.0 => 5.2.13

Used Package Manager

npm

Expected Behavior

A route with ErrorBoundary export should render the error boundary when runtime exception is thrown, regardless if exception was encountered above or below <Outlet />

Actual Behavior

When

  1. parent route has ErrorBoundary
  2. child route also has ErrorBoundary
  3. in parent route a component after the <Outlet /> throws an exception during SSR
    Remix will fail server render with "Unexpected Server Error"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants