Documentation ¶ Index ¶ type Code type Details func Fields(pairs ...any) Details type Error func As(err error) (*Error, bool) func New(code Code, message string, details ...Details) *Error func Wrap(cause error, code Code, message string, details ...Details) *Error func (e *Error) Error() string func (e *Error) Unwrap() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Code ¶ type Code string const ( CodeInvalidArgument Code = "INVALID_ARGUMENT" CodeUnauthorized Code = "UNAUTHORIZED" CodeForbidden Code = "FORBIDDEN" CodeNotFound Code = "NOT_FOUND" CodeConflict Code = "CONFLICT" CodeTooManyRequests Code = "TOO_MANY_REQUESTS" CodeUnavailable Code = "UNAVAILABLE" CodeTimeout Code = "TIMEOUT" CodeInternal Code = "INTERNAL" ) type Details ¶ type Details map[string]any func Fields ¶ func Fields(pairs ...any) Details type Error ¶ type Error struct { Code Code Message string Details Details Cause error } func As ¶ func As(err error) (*Error, bool) func New ¶ func New(code Code, message string, details ...Details) *Error func Wrap ¶ func Wrap(cause error, code Code, message string, details ...Details) *Error func (*Error) Error ¶ func (e *Error) Error() string func (*Error) Unwrap ¶ func (e *Error) Unwrap() error Source Files ¶ View all Source files error.go Click to show internal directories. Click to hide internal directories.