I have an object I'd like to run through Decoders, and I'd like to log the errors that it throws when there are validation issues - but there's one field I'd prefer not to appear in the logs as it contains sensitive data. Is there a nice way to achieve this - or, perhaps, a nice way to have control more generally over the constructed error messages?
As a workaround, I could delete the sensitive key from the object ahead of time, run the remaining object through Decoders, and then reinstate the sensitive key afterwards, but I'm wondering whether there's some nicer way to achieve this that I'm missing. Thanks!
I have an object I'd like to run through Decoders, and I'd like to log the errors that it throws when there are validation issues - but there's one field I'd prefer not to appear in the logs as it contains sensitive data. Is there a nice way to achieve this - or, perhaps, a nice way to have control more generally over the constructed error messages?
As a workaround, I could delete the sensitive key from the object ahead of time, run the remaining object through Decoders, and then reinstate the sensitive key afterwards, but I'm wondering whether there's some nicer way to achieve this that I'm missing. Thanks!