Add option to turn off Error Sanitization in Production #13213
manzaloros
started this conversation in
Proposals
Replies: 1 comment
-
I was bumping into this too, for me I want to show the full errors on our development environment. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when the server mode is not development, Remix / React Router 7 removes the details of any errors being thrown before they are sent to the client: https://github.com/remix-run/remix/blob/main/packages/remix-server-runtime/errors.ts#L58
This behavior is documented here.
While it makes total sense to do this for most applications, I am working on an internal app accessible only on a corporate network, and while we're not worried about leaking internal details in the stack trace, displaying the full error details and stack trace if something goes really wrong makes it easier for us to diagnose issues the user is having.
I propose:
To add a config option to disable the error sanitization altogether (while keeping the current default of only sanitizing in prod). Perhaps an "always sanitize" option would also make sense, for those who want the dev behavior to match prod.
Other threads discussing this problem:
Beta Was this translation helpful? Give feedback.
All reactions