Skip to content

Tags: g-lib/errors

Tags

v1.7.3

Toggle v1.7.3's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Make errors.Formattable more useful, fix a redact bug This patch ensures that the result value from errors.Formattable also implements error, so that detailed error output is properly produced if formatted via %+v. It also bumps the redact dependency to fix a bug.

v1.7.2

Toggle v1.7.2's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Fix a silly bug 

v1.7.1

Toggle v1.7.1's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Make `WithSafeDetails` more useful Prior to this patch, `WithSafeDetails` was capturing safe strings but they were not shown in the output of `%+v`. This choice was made at the time where `WithSafeDetails` was the only way for `errors.New` to capture safe strings for reporting. At that time, displaying the safe strings in the `%+v` output would *duplicate* error messages: once from the `Error()` output, and one from the safe details. Since v1.7, `errors.New` and related functions do not use `WithSafeDetails` any more. The risk for data duplication is thus removed. So this patch evolves the wrapper produced by `WithSafeDetails` to also report its safe strings during `%+v` renderings. Additionally, the logic for `WithSafeDetails` previously duplicated information from the arguments: the text would be rendered once in full in the first detail string, then each argument would be detailed further (with type information and all) in additional strings. For example: ``` WithSafeDetails("hello ", redact.Safe("world")) (1) 2 safe details enclosed | hello world | -- arg 1 (string): world ``` (See how "world" is duplicated) In practice, this amount of detailing has not proven useful, and it is in fact detrimental to the readability of error strings. So this patch removes it. The new output for the example above is: ``` (1) hello world ```

v1.7.0

Toggle v1.7.0's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Clarify PII safety in README. 

v1.6.1

Toggle v1.6.1's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
safedetails: More improvements to error redaction This makes multi-line error details indented.

v1.5.2

Toggle v1.5.2's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
safedetails: More improvements to error redaction This makes multi-line error details indented.

v1.6.0

Toggle v1.6.0's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Make `New()` and `Wrap()` consider their string as PII-free **THIS IS A BREAKING CHANGE.** The `errors.New()`, `errors.NewWithDepth()`, `errors.Wrap()` and `errors.WrapWithDepth()` now consider their string argument as PII-free, and the string is now also included in Sentry reports. This is a breaking change: in previous versions, only the format argument to `errors.Newf`, `errors.Wrapf` etc was considered to be PII-free. This also means that **care must be taken when using this `errors` library as drop-in replacement for other errors libraries**: callers that use `New()` and `Wrap()` directly must be audited to ensure that they indeed pass strings that are safe for reporting to Sentry. This can be enforced e.g. via linters that assert that the argument is a literal (constant) string. This is the approach taken e.g. in CockroachDB.

v1.5.1

Toggle v1.5.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request cockroachdb#43 from cockroachdb/20800812-report report,redact: incrementally improve the ergonomics of reports

v1.5.0

Toggle v1.5.0's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Update go.mod. 

v1.5

Toggle v1.5's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Update go.mod.