MCPcopy Index your code
hub / github.com/cockroachdb/errors / withGrpcCode

Struct withGrpcCode

extgrpc/ext_grpc.go:58–61  ·  view source on GitHub ↗

withGrpcCode wraps an error with a gRPC status code.

Source from the content-addressed store, hash-verified

56
57// withGrpcCode wraps an error with a gRPC status code.
58type withGrpcCode struct {
59 cause error
60 code codes.Code
61}
62
63// WrapWithGrpcCode wraps an error with a gRPC status code.
64func WrapWithGrpcCode(err error, code codes.Code) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected