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
Investigating how global error components and fallback UI are implemented in the codebase.
- Assistant
Implementing last-resort handling: wrapping user
global-errorwith the built-in default (matching Next.js) and adding a static HTML fallback when rendering fails. - Assistant
Implemented last-resort handling when a custom
global-errorcomponent throws, aligned with Next.js’s outerDefaultGlobalErrorboundary.Changes
-
app-global-error-last-resort.ts(new)- Detects a user-defined vs built-in global error module.
- Wraps user
global-errorin anErrorBoundarythat falls back to the built-in default UI. buildDefaultGlobalErrorLastResortHtmlResponse: static HTML document (HTTP 200, no original page error/digest), with middleware headers/cookies preserved.
-
app-page-boundary-render.ts- Global-error renders use
wrapUserGlobalErrorElement. - Global-error HTML uses
waitForAllReadyand catches render failures → last-resort HTML response.
- Global-error renders use
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.