Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnauthenticated = &Error{ Errors: []string{http.StatusText(http.StatusUnauthorized)}, StatusCode: http.StatusUnauthorized, } ErrISE = &Error{ Errors: []string{http.StatusText(http.StatusInternalServerError)}, StatusCode: http.StatusInternalServerError, } ErrNotFound = &Error{ Errors: []string{http.StatusText(http.StatusNotFound)}, StatusCode: http.StatusNotFound, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. ErrMethodNotAllowed = &Error{ Errors: []string{http.StatusText(http.StatusMethodNotAllowed)}, StatusCode: http.StatusMethodNotAllowed, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. ErrForbidden = &Error{ Errors: []string{http.StatusText(http.StatusForbidden)}, StatusCode: http.StatusForbidden, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. ErrUnimplemented = &Error{ Errors: []string{"unimplemented"}, StatusCode: http.StatusNotImplemented, } )
Functions ¶
func ErrorHandler ¶
func ErrorHandler(w http.ResponseWriter, _ *http.Request, err error)
func RequestErrorHandler ¶
func RequestErrorHandler(w http.ResponseWriter, r *http.Request, err error)
func ResponseErrorHandler ¶
func ResponseErrorHandler(w http.ResponseWriter, r *http.Request, err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.