Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAuthFailed = errors.New("access denied to this resource") ErrPermFailed = errors.New("invalid permissions to this resource") ErrBindingFailed = errors.New("cannot bind the request data") ErrValidationFailed = errors.New("cannot validate the request data") ErrDocumentNotFound = errors.New("cannot find the document") ErrDocumentsNotFound = errors.New("cannot find all documents") ErrDocumentNotCreate = errors.New("cannot create the document") ErrDocumentNotUpdate = errors.New("cannot update the document") ErrDocumentNotDelete = errors.New("cannot delete the document") ErrMultipleDocumentsFound = errors.New("find multiple documents, but only one was expected") ErrRequestFailed = errors.New("request failed") ErrRequestsLimitExceeded = errors.New("limit of requests exceeded") ErrInactivityTimeout = errors.New("inactivity timeout reached") )
Functions ¶
func NewErrorStatusCodeMaps ¶
Types ¶
type HttpErrorHandler ¶
type HttpErrorHandler struct {
// contains filtered or unexported fields
}
func New ¶
func New(errorStatusCodeMaps map[error]int) *HttpErrorHandler
New creates a new HttpErrorHandler
func (*HttpErrorHandler) Handler ¶
func (h *HttpErrorHandler) Handler(err error, c echo.Context)
Handler handles the error and sends the response to the client
Click to show internal directories.
Click to hide internal directories.