|
if(err.cause && !_isErrorPublic(err.cause)) { |
|
object.cause = null; |
|
} |
This code assumes that every cause would be a BedrockError that would be explicitly marked as public.
It is not common practice to wrap every error that might be included in a BedrockError in another BedrockError.
I think the practical solution here is to say that the cause should be logged if the outer BedrockError is marked as public.
This of course could mean that a cause leaks data that should not be exposed in logs. However, the current state of affairs makes it impossible to debug applications issues in deployments.
bedrock/lib/util.js
Lines 80 to 82 in eaac0b9
This code assumes that every
causewould be a BedrockError that would be explicitly marked as public.It is not common practice to wrap every error that might be included in a BedrockError in another BedrockError.
I think the practical solution here is to say that the
causeshould be logged if the outer BedrockError is marked as public.This of course could mean that a
causeleaks data that should not be exposed in logs. However, the current state of affairs makes it impossible to debug applications issues in deployments.