Client Error Compiled Resource

Is there a clean/easy way to tell chef, on error, not to print out the compiled resource? Is this something that can be done with a formatter?

The issue is this, we at compile time dynamically retrieve some passwords and if that resource for some reason fails then the password gets logged in plain text in the error output of the compiled resource.