Skip to content

Tags: rail/errors

Tags

v1.8.4

Toggle v1.8.4'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#67 from knz/20210413-proto Update to gogoproto 1.3.

v1.8.3

Toggle v1.8.3's commit message
extgrpc: add support for automatic en/decoding of gRPC Status This patch adds support for automatic en/decoding of gRPC `Status` errors, enabled by importing the `extgrpc` package. It supports statuses generated both by the standard `google.golang.org/grpc/status` and the gogoproto-based `github.com/gogo/status` packages. Encoded statuses are always represented as `gogo/status`-based `Status` Protobufs, since the `EncodedError` type is a gogoproto type using an `Any` field for structured errors, and only gogoproto types can be placed here since standard Protobufs are not registered in the gogoproto type registry. We lock the `gogo/googleapis` package to 1.2.0 to use gogoproto 1.2-compatible Protobufs required by CRDB, these have been verified to not be vulnerable to the "skippy pb" bug. Note that to preserve error details, gogo-based `Status` objects with gogo-based details must be used, otherwise details may not be preserved. This is for similar reasons as outlined above, and is a limitation in the gRPC package -- see code comments for further details. A CRDB linter rule forbidding use of `Status.WithDetails()` was submitted in cockroachdb/cockroach#61617.

v1.8.2

Toggle v1.8.2'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#59 from knz/20201212-errors markers: delegate to an Is() method if present

v1.8.1

Toggle v1.8.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#55 from knz/20201106-redact-fmt Bump redact to get the fix to the string builder fmt bug

v1.8.0

Toggle v1.8.0's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
knz Raphael Poss
README: fix typo 

v1.7.5

Toggle v1.7.5's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
knz Raphael Poss
Check that nil parameters don't get redacted in the -f() variants. 

v1.7.4

Toggle v1.7.4's commit message

Verified

This commit was signed with the committer’s verified signature. The key has expired.
knz Raphael Poss
Bump the redact dep to get a minor API benefit. 

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 ```