Documentation
¶
Index ¶
- func AddErrorContext(err error, field, message string) error
- func Cause(err error) error
- func GetErrorContext(err error) map[string]string
- func GetErrorDetail(err error) string
- func GetErrorMessage(err error) string
- func New(msg string) error
- func Newf(msg string, args ...interface{}) error
- func Wrap(err error, msg string) error
- func Wrapf(err error, msg string, args ...interface{}) error
- type ErrorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddErrorContext ¶
AddErrorContext adds a context to an error
func GetErrorContext ¶
GetErrorContext returns the error context
func GetErrorDetail ¶
GetErrorDetail return the detail of a customError
func GetErrorMessage ¶
GetErrorMessage return the detail of a customError
Types ¶
type ErrorType ¶
type ErrorType uint
ErrorType is the type of an error
const ( // NoType - NoType ErrorType = iota // BadRequest (400) BadRequest Unauthorized // Forbidden (403) Forbidden // NotFound (404) NotFound // MethodNotAllowed (405) MethodNotAllowed // PreconditionFailed (412) PreconditionFailed // UnsupportedMediaType (415) UnsupportedMediaType // InternalServerError (500) InternalServerError // NotImplemented (501) NotImplemented ServiceUnavailable )
Click to show internal directories.
Click to hide internal directories.