Documentation ¶
Overview ¶
Package errors provides functions to create high quality gRPC status messages for reporting failures.
Package errors provides functions to create high quality gRPC status messages for reporting failures.
Index ¶
- func AddDetail(st *status.Status, detail proto.Message) *status.Status
- func AddRetryInfo(st *status.Status, duration time.Duration) *status.Status
- func BadValue(fieldName string, fieldValue interface{}) error
- func InternalError(err error) error
- func NotFound(fieldName string, id string) error
- func RequiredField(fieldName string) error
- func WithCode(code codes.Code, format string) error
- func WithCodef(code codes.Code, format string, args ...interface{}) error
- func Wrap(err error) error
- func WrapWithCode(err error, code codes.Code, msg string) error
- func WrapWithCodef(err error, code codes.Code, format string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRetryInfo ¶
AddRetryInfo annotates an error status with a retry duration.
func InternalError ¶
InternalError returns an error with raw details.
func RequiredField ¶
RequiredField returns an error indicating a field did not have a value.
func WrapWithCode ¶
WrapWithCode the error with a gRPC status error, retain the call stack.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.