Allow-list certain attributes in Error object to not be Sanitized in Production #9724
thomasverleye
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're currently implementing a feature to have a Correlation IDs and an internal error codes for known issues shown in our error boundary component.
In an ideal world, we create a custom Error class and have these as an attribute which we can derive from within said error boundary component.
Unfortunately, it is not possible to have it this way as Remix automatically sanitizes all errors that go to the client.
While we know there is the option to create and throw a

Response
and add those attributes in a data object. It is how-ever breaking our implementation withSentry
. This will prevent us from getting a clear stacktrace and error message in our error events.While we possible could look into muting said error in Sentry and throwing the exception manually for these types of errors, this feels a lot of extra hoops for something that seems like more logic to be handled through a error sanitization configuration.
Beta Was this translation helpful? Give feedback.
All reactions