Fix the handling of %T in redaction - get real type instead of redact.escapeArg
#53207
Labels
A-error-handling
Error messages, error propagations/annotations
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
regression
Regression from a release.
PR #53199 is introducing the use of the
redact
package for errors, and it was added for logging before.However the logic in
redact
breaks the%T
formatting verb from the stdlib.This needs to be fixed.
Upstream: cockroachdb/redact#1
Symptom of the problem
For example,
errors.AssertionFailedf("expected bool, got %T", d)
should report"
expected bool, got *tree.DBool
"And instead the following is produced:
"
expected bool, got *redact.escapeArg
"Workaround
Until this is fixed, if the type is needed change
to
The text was updated successfully, but these errors were encountered: