Documentation ¶
Index ¶
- Variables
- type Error
- func (e *Error) AppendMetadata(kvs ...any) *Error
- func (e *Error) Copy() *Error
- func (e *Error) Error() (s string)
- func (e *Error) StatusCode() int
- func (e *Error) WithMessage(s string, v ...any) *Error
- func (e *Error) WithMetadata(kvs ...any) *Error
- func (e *Error) WithStatusCode(statusCode int) *Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Is = errors.Is As = errors.As )
Functions ¶
This section is empty.
Types ¶
type Error ¶ added in v1.9.0
type Error struct { Code int `json:"code"` Message string `json:"message,omitempty"` Metadata map[string]any `json:"metadata,omitempty"` // contains filtered or unexported fields }
func FromStatusCode ¶ added in v1.9.0
func (*Error) AppendMetadata ¶ added in v1.9.0
func (*Error) StatusCode ¶ added in v1.9.0
func (*Error) WithMetadata ¶ added in v1.9.0
func (*Error) WithStatusCode ¶ added in v1.9.0
Click to show internal directories.
Click to hide internal directories.