Wrap wraps an error with a message prefix. A stack trace is retained. Note: the prefix string is assumed to not contain PII and is included in Sentry reports. Use errors.Wrapf(err, "%s", ) for errors strings that may contain PII information. Detail output: - original error message +
(err error, msg string)
| 113 | // - stack trace and message via `errors.GetSafeDetails()`. |
| 114 | // - stack trace and message in Sentry reports. |
| 115 | func Wrap(err error, msg string) error { return errutil.WrapWithDepth(1, err, msg) } |
| 116 | |
| 117 | // WrapWithDepth is like Wrap except the depth to capture the stack |
| 118 | // trace is configurable. |
searching dependent graphs…