grpcerror

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterUnavailableErrorCode

func FilterUnavailableErrorCode(rpcErr error) error

FilterUnavailableErrorCode rpc error that caused due to transient connectivity issue.

func GetCode

func GetCode(rpcErr error) codes.Code

GetCode returns GRPC error code.

func HasCode

func HasCode(rpcErr error, code codes.Code) bool

HasCode returns true if the rpcErr holds the given code.

func WrapCancelled

func WrapCancelled(err error) error

WrapCancelled creates a grpc error with a codes.Canceled status code for a given error.

func WrapInternalError

func WrapInternalError(err error) error

WrapInternalError creates a grpc error with a codes.Internal status code for a given error.

func WrapInvalidArgument

func WrapInvalidArgument(err error) error

WrapInvalidArgument creates a grpc error with a codes.InvalidArgument status code for a given error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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