Documentation ¶
Index ¶
- Constants
- func As(err error, target interface{}) bool
- func Is(err, target error) bool
- func LogError(log *zerolog.Event, err error) *zerolog.Event
- func SetGRPCDebugMode(enable bool)
- func Unwrap(err error) error
- type Error
- func (e *Error) Cause() error
- func (e *Error) Code() int
- func (e *Error) Error() string
- func (e *Error) GRPCStatus() *status.Status
- func (e *Error) Log(log *zerolog.Event) *zerolog.Event
- func (e *Error) Message() string
- func (e *Error) Unwrap() error
- func (e *Error) With(key string, value interface{}) *Error
- func (e *Error) WithCode(code int) *Error
- func (e *Error) WithGRPCCode(code codes.Code) *Error
- type GRPCError
Constants ¶
View Source
const InvalidCode = -1
Variables ¶
This section is empty.
Functions ¶
func SetGRPCDebugMode ¶
func SetGRPCDebugMode(enable bool)
SetGRPCDebugMode sets grpc error debug mode. If enable, GRPCStatus will include error cause in details.
Types ¶
type Error ¶
type Error struct { GRPCError // contains filtered or unexported fields }
func (*Error) GRPCStatus ¶
GRPCStatus implements GrpcError interface. Returning this error in grpc API will add detail and cause into details field in GRPC error response. Once GRPCStatus is called, the status data is cached, new changes will not be reflected in new calls.
Click to show internal directories.
Click to hide internal directories.