Replies: 1 comment 3 replies
-
I would like to understand the problem better. It feels like this should be solved at the low level "minimal" API, not pages. Is it only about customizing
so, you want to return something like |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand how to gracefully handle exceptions raised on the server.
This document suggests that Suspense components can act as error boundaries for SSR - https://github.com/reactjs/rfcs/blob/main/text/0215-server-errors-in-react-18.md
It would be nice to additionally register a fallback component that would be rendered instead of the
error.toString()
.I see that both RSC and SSR waku middleware have this in a catch block:
Maybe if I add middleware that runs after the other renderers, I can see if ctx.res is an error response and update the rendered body.
If I can create unlinked router entries for my error pages, then my middleware could use the rsc or ssr renderers to render one of those entries.
Maybe the exported getConfig() for pages could return the name of a fallback error entry point to use if an exception is hit while rendering that page?
Beta Was this translation helpful? Give feedback.
All reactions