perrors

package
v0.0.0-...-ecabb92 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwsErrCode

func AwsErrCode(err error) string

func ConvertGrpcErrorInServerInterceptor

func ConvertGrpcErrorInServerInterceptor(ctx context.Context, err error) error

Takes an error and return back an appropriate error that should be passed to grpc server handler. The goal here is to only pass grpc status set by perrors.grpcError and not native grpc status package, to avoid accidentally a grpc error from a dependency to client.

func GrpcErrCode

func GrpcErrCode(err error) grpc_codes.Code

similar to spanner.ErrCode but handles wrapped errors

func GrpcError

func GrpcError(c grpc_codes.Code, msg string) error

func GrpcErrorf

func GrpcErrorf(c grpc_codes.Code, format string, a ...interface{}) error

func IsDeadlineExceeded

func IsDeadlineExceeded(err error) bool

func UserFacingInternalGrpcErrorf

func UserFacingInternalGrpcErrorf(eventID *sentry.EventID, format string, a ...interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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