Documentation ¶
Index ¶
- Variables
- func Code(err error) codes.Code
- func Error(c codes.Code, msg string) error
- func Errorf(c codes.Code, msg string, a ...interface{}) error
- func Is(err, target error) bool
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerErrorInterceptor() grpc.UnaryServerInterceptor
- func WrapErr(err error, c codes.Code, msg string) error
- func WrapErrf(err error, c codes.Code, msg string, a ...interface{}) error
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 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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.