Documentation ¶
Overview ¶
Package errutil contains helpers for error.
Index ¶
- func ErrorPath(list ...string) string
- func ErrorReason(err error) string
- func NewError(code codes.Code, name string, msg string) error
- func NewIndexError(code codes.Code, name string, index int, msg string) error
- func NotFound(err error) bool
- func WithErrorReason(reason string, err error) error
- func WithMetadata(key, value string, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorReason ¶ added in v0.8.8
ErrorReason find error reason attached in status error.
func NewIndexError ¶ added in v0.9.8
NewIndexError returns a Status error with an additional index metadata field.
func WithErrorReason ¶ added in v0.8.8
WithErrorReason add error reason to status error.
func WithMetadata ¶ added in v0.9.8
WithMetadata attaches or replaces a key/value pair to ErrorInfo detail status error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.