Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoPermission = errors.New("you do not have permission to do that") ErrNoSession = errors.New("no session found") ErrInternal = errors.New("internal error") ErrConflict = errors.New("conflict") ErrNotFound = errors.New("not found") ErrMethod = errors.New("method not allowed") //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrNoPermission = &Error{ Errors: []string{ErrNoPermission.Error()}, StatusCode: http.StatusUnauthorized, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrNoSession = &Error{ Errors: []string{ErrNoSession.Error()}, StatusCode: http.StatusUnauthorized, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrInternal = &Error{ Errors: []string{ErrInternal.Error()}, StatusCode: http.StatusInternalServerError, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrNotFound = &Error{ Errors: []string{ErrNotFound.Error()}, StatusCode: http.StatusNotFound, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrMethodNotAllowed = &Error{ Errors: []string{ErrMethod.Error()}, StatusCode: http.StatusMethodNotAllowed, } //nolint:errname // This is intentional to separate pure error types from wrapper API Errors. APIErrForbidden = &Error{ Errors: []string{ErrNoPermission.Error()}, StatusCode: http.StatusForbidden, } )
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.