Documentation
¶
Overview ¶
Package errors provides a set of tools for indicating errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Is is an alias for the errors.Is function. This allows this package to // used in place of the stdlib error package. Is = errors.Is // As is an alias for the errors.As function. This allows this package to // used in place of the stdlib error package. As = errors.As // New is an alias for the errors.New function. This allows this package to // used in place of the stdlib error package. New = errors.New )
View Source
var ( // ErrBadRequest indicates an error due to client error. // // RFC 9110, 15.5.1 ErrBadRequest = HTTPError{ // contains filtered or unexported fields } // ErrForbidden indicates an authentication error due insufficient // credentials. The client should not automatically repeat the request with // the same credentials. The client MAY repeat the request with new or // different credentials. // // RFC 9110, 15.5.4 ErrForbidden = HTTPError{ // contains filtered or unexported fields } // ErrNotFound indicates that the requested resource was not found. // // RFC 9110, 15.5.5 ErrNotFound = HTTPError{ // contains filtered or unexported fields } // ErrConflict indicates that the current request could not be completed due // to the current status of the requested resource. This can occur on a POST // request where the resource already exists. // // RFC 9110, 15.5.10 ErrConflict = HTTPError{ // contains filtered or unexported fields } // ErrInternal indicates that the server encountered an unexpected condition // that prevented it from fulfilling the request. // // RFC 9110, 15.6.1 ErrInternal = HTTPError{ // contains filtered or unexported fields } // ErrNotImplemented indicates that the server does not support the // functionality required to fulfill the request. // // // RFC 9110, 15.6.2 ErrNotImplemented = HTTPError{ // contains filtered or unexported fields } // HTTPErrors maps http statuses back to manifest http errors. HTTPErrors = map[int]HTTPError{ http.StatusBadRequest: ErrBadRequest, http.StatusForbidden: ErrForbidden, http.StatusNotFound: ErrNotFound, http.StatusConflict: ErrConflict, http.StatusInternalServerError: ErrInternal, http.StatusNotImplemented: ErrNotImplemented, } )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.