Replies: 2 comments 1 reply
-
|
+1 RSCs will be the future, but (as far as I understand) they currently lack a way to signal error details/context to the next error boundary:
We will need a solution for this issue before RSC will be stable. The proposal would be one way. |
Beta Was this translation helpful? Give feedback.
-
|
Requiring a class property will mean you need to create custom error classes for errors you may not want to sanitize I think it would be better to have an (optional) export on entry.server that receives the error, and other context, and returns a boolean if it should be sanitized or not And by default this can be true on prod and false on dev |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now all server error messages are sanitized here:
react-router/packages/react-router/lib/server-runtime/errors.ts
Line 48 in b4c3d7c
I would like to preserve some error messages so that the message can be used in the client. This can be done with custom Error classes with a field
skipReactRouterSanitizeBeta Was this translation helpful? Give feedback.
All reactions