errdef

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrInternal error, followed by codes.Internal
	ErrInternal = errors.New("internal error")
	// ErrInvalidArgument error, followed by codes.InvalidArgument
	ErrInvalidArgument = errors.New("invalid request argument error")
	// ErrDecodeGRPCRequest error
	ErrDecodeGRPCRequest = errors.Wrap(ErrInternal, "decode GRPC request error")
	// ErrEncodeGRPCResponse error
	ErrEncodeGRPCResponse = errors.Wrap(ErrInternal, "encode GRPC response error")
	// ErrNotExpectedGRPCRequestType error
	ErrNotExpectedGRPCRequestType = errors.Wrap(ErrInvalidArgument, "not expected grpc request type")
	// ErrNotExpectedGRPCResponseType error
	ErrNotExpectedGRPCResponseType = errors.Wrap(ErrInternal, "not expected grpc response type")
	// ErrNotExpectedProtoGRPCResponseType error
	ErrNotExpectedProtoGRPCResponseType = errors.Wrap(ErrInternal, "not expected proto grpc response type")

	// ErrUnmarshalRequest error
	ErrUnmarshalRequest = errors.Wrap(ErrInvalidArgument, "error unmarshal request")
	// ErrMarshalRequest error
	ErrMarshalRequest = errors.Wrap(ErrInternal, "error marshal request")
	// ErrUnmarshalResponse error
	ErrUnmarshalResponse = errors.Wrap(ErrInternal, "error unmarshal response")
	// ErrMarshalResponse error
	ErrMarshalResponse = errors.Wrap(ErrInternal, "error marshal response")
	// ErrMarshalResponseKey error
	ErrMarshalResponseKey = errors.Wrap(ErrInternal, "marshal response key error")
	// ErrUnimplemented error
	ErrUnimplemented = errors.Wrap(ErrInternal, "unimplemented method")
	// ErrInvalidKID error
	ErrInvalidKID = errors.Wrap(ErrInvalidArgument, "invalid KID")
	// ErrInvalidClaims error
	ErrInvalidClaims = errors.Wrap(ErrInvalidArgument, "invalid Claims")
	// ErrKIDNotExists error
	ErrKIDNotExists = errors.Wrap(ErrInvalidArgument, "enc, sig keys are not found for requested kid")
	// ErrDecryptRefreshToken error
	ErrDecryptRefreshToken = errors.Wrap(ErrInvalidArgument, "refresh token couldn't be decrypted")
	// ErrInvalidRefreshToken error
	ErrInvalidRefreshToken = errors.Wrap(ErrInvalidArgument, "invalid refresh token")
	// ErrRefreshTokenExpired error
	ErrRefreshTokenExpired = errors.Wrap(ErrInvalidRefreshToken, "refresh token expired")
	// ErrInvalidRefreshClaims error
	ErrInvalidRefreshClaims = errors.Wrap(ErrInvalidRefreshToken, "invalid refresh token claims")
	// ErrNullKeysRepo error
	ErrNullKeysRepo = errors.Wrap(ErrInternal, "keys repository pointer is null")
)

Functions

func Code

func Code(err error) codes.Code

Code func

func Error

func Error(c codes.Code, msg string) error

Error func

func Errorf

func Errorf(c codes.Code, msg string, a ...interface{}) error

Errorf func

func Is

func Is(err, target error) bool

Is func

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor for panic recovery.

func UnaryServerErrorInterceptor

func UnaryServerErrorInterceptor() grpc.UnaryServerInterceptor

UnaryServerErrorInterceptor returns a new unary server interceptor for error handling

func WrapErr

func WrapErr(err error, c codes.Code, msg string) error

WrapErr func

func WrapErrf

func WrapErrf(err error, c codes.Code, msg string, a ...interface{}) error

WrapErrf func

Types

This section is empty.

Jump to

Keyboard shortcuts

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