Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = New(http.StatusBadRequest) ErrForbidden = New(http.StatusForbidden) ErrNotFound = New(http.StatusNotFound) ErrInternalServerError = New(http.StatusInternalServerError) ErrBadGateway = New(http.StatusBadGateway) )
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code uint32
type ErrorOption ¶
type ErrorOption func(e *HTTPError)
func WithError ¶
func WithError(err error) ErrorOption
func WithErrorf ¶
func WithErrorf(format string, a ...any) ErrorOption
type HTTPError ¶
type HTTPError struct { Status int `json:"-"` Message string `json:"message"` Code Code `json:"code,omitempty"` // contains filtered or unexported fields }
func (HTTPError) Wrap ¶
func (e HTTPError) Wrap(options ...ErrorOption) error
Click to show internal directories.
Click to hide internal directories.