In my production Phoenix config, I currently have
config :phoenix, :filter_parameters, [
"password", "password_confirmation",
"first_name", "last_name",
"email"
]
However, when an exception occurs when handling a %User{}
struct, whole struct is printed out, so the fields are leaked out and logged.
Is there way to plug into Phoenix’s exception handling and ensure these fields are never printed out? I’d like to keep the exception for debugging purposes, but ensure fields in specific structs are white/blacklisted.
Thanks!