grpcstatus

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromError

func FromError(err error) (s *status.Status, ok bool)

Since error can be wrapped and the `FromError` function only checks for `GRPCStatus` function and as a fallback uses the `Unknown` gRPC status we need to unwrap the error if possible to get the original status. pkg/errors and Go native errors packages have two different approaches so we try to unwrap both types. Eventually should be implemented in the go-grpc status function `FromError`. See https://github.com/grpc/grpc-go/issues/2934

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL