A self-throwing global error component renders no last-resort UI If the global error…
- User
A self-throwing global error component renders no last-resort UI
If the global error component itself fails, return the built-in valid HTML fallback with the expected successful fallback status while preserving response headers and cookies. Local error boundaries and framework navigation/control-flow signals must retain their existing semantics, and the original boundary exception must not be exposed.
Interface
No new public interfaces are introduced.
- Assistant
Now wire the fallback into
renderAppPageErrorBoundary: - Assistant
Now add tests to
tests/app-page-boundary-render.test.ts: - Assistant
Now install workspace deps for the new fixture (adds it as a workspace importer):
- Assistant
Now register the test in both project lists in
vite.config.ts: - Assistant
End-to-end works, and the boundary exception only appears in server logs. Now run the neighboring suites and the compat tests:
- Assistant
Knip passes (the two config hints are pre-existing and unrelated). Final verification run of everything touched:
- Assistant
All green — 63 tests across the four affected suites, plus format/lint/type checks and knip.
Summary
Problem: When an uncaught error escalated to and that component threw during rendering, the SSR shell rejection propagated out of unhandled — the request ended as a generic 500, and in dev the boundary's own exception message was echoed to the client ().
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.