Stands in for an exception raised while a decrypted value was in hand.
An exception can carry the value it failed on: MatchError holds its term, a database error
its detail, FunctionClauseError's stack frame the arguments. So it never reaches a log or
telemetry from such a path. This one holds only the module of the original, as type.
scrub_stacktrace/1 and reduce/1 do the same for a stacktrace and for an error reason.
Summary
Functions
What decree's own log lines may show of an exception raised with stacktrace:
** (Module) and the stacktrace scrubbed by scrub_stacktrace/1, never the exception's
message or fields. A Decree.PersonalFields.RedactedError keeps its own message, which
names only the module it stands in for; a term that is not an exception is shown by
reduce/1.
What decree's own log lines may show of a command or an event: a struct's module, and
reduce/1 of any other term.
Answers the stand-in for exception.
Reduces an error reason to what decree's own logs and telemetry may show: an atom stays, an
exception becomes its type, a tuple with an atom head becomes {head, :redacted}, and
anything else :redacted.
Answers stacktrace with each frame's argument list reduced to its arity, and each frame's
location reduced to its file and line.
Types
Functions
@spec format_reduced(term(), Exception.stacktrace()) :: String.t()
What decree's own log lines may show of an exception raised with stacktrace:
** (Module) and the stacktrace scrubbed by scrub_stacktrace/1, never the exception's
message or fields. A Decree.PersonalFields.RedactedError keeps its own message, which
names only the module it stands in for; a term that is not an exception is shown by
reduce/1.
What decree's own log lines may show of a command or an event: a struct's module, and
reduce/1 of any other term.
@spec redact(Exception.t()) :: t()
Answers the stand-in for exception.
Reduces an error reason to what decree's own logs and telemetry may show: an atom stays, an
exception becomes its type, a tuple with an atom head becomes {head, :redacted}, and
anything else :redacted.
@spec scrub_stacktrace(Exception.stacktrace()) :: Exception.stacktrace()
Answers stacktrace with each frame's argument list reduced to its arity, and each frame's
location reduced to its file and line.