Tags: jilinhao/errors
Tags
Merge pull request cockroachdb#67 from knz/20210413-proto Update to gogoproto 1.3.
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.
Merge pull request cockroachdb#59 from knz/20201212-errors markers: delegate to an Is() method if present
Merge pull request cockroachdb#55 from knz/20201106-redact-fmt Bump redact to get the fix to the string builder fmt bug
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.
PreviousNext