Closed shcallaway closed 1 year ago
Hi, thanks for still using my library and asking for improvements!
I think I could implements the second solution because there are lot of place where this is all the object that does not fit the rules not only a property and some users perhaps need to have more information.
I will found a way to add a config to specify if the errors should display values or not.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
Hello, hope you're doing well.
typescript-json-serializer's current errors include the entire object that failed serialization/deserialization. For example:
But the objects I am serializing/deserializing contain sensitive data (PII). I do not want this data to appear in my logs.
My current solution is to use a custom errorCallback that replaces the default error message:
But this solution is not ideal because it means I cannot see the error cause in my logs. Instead of seeing "Additional properties detected", I see "Deserialization failed", which is much less specific/useful.
Proposed solution
Additional properties detected: foo.
)