Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorCtxResponse(ctx echo.Context, err error, debug bool) error
- func ErrorResponse(err error, debug bool) (int, interface{})
- func NewBadRequestError(ctx echo.Context, causes interface{}, debug bool) error
- func NewForbiddenError(ctx echo.Context, causes interface{}, debug bool) error
- func NewInternalServerError(ctx echo.Context, causes interface{}, debug bool) error
- func NewNotFoundError(ctx echo.Context, causes interface{}, debug bool) error
- func NewUnauthorizedError(ctx echo.Context, causes interface{}, debug bool) error
- type RestErr
- type RestError
Constants ¶
View Source
const ( ErrBadRequest = "Bad request" ErrNotFound = "Not Found" ErrRequestTimeout = "GenRequest Timeout" ErrInvalidEmail = "Invalid email" ErrInvalidPassword = "Invalid password" ErrInvalidField = "Invalid field" ErrInternalServerError = "Internal Server Error" )
Variables ¶
Functions ¶
func ErrorCtxResponse ¶
ErrorCtxResponse Error response object and status code
func ErrorResponse ¶
ErrorResponse Error response
func NewBadRequestError ¶
NewBadRequestError New Bad GenRequest Error
func NewForbiddenError ¶
NewForbiddenError New Forbidden Error
func NewInternalServerError ¶
NewInternalServerError New Internal Server Error
func NewNotFoundError ¶
NewNotFoundError New Not Found Error
func NewUnauthorizedError ¶
NewUnauthorizedError New Unauthorized Error
Types ¶
type RestErr ¶
RestErr Rest error interface
func NewRestError ¶
NewRestError New Rest Error
func NewRestErrorFromBytes ¶
NewRestErrorFromBytes New Rest Error From Bytes
func NewRestErrorWithMessage ¶
NewRestErrorWithMessage New Rest Error With Message
func ParseErrors ¶
ParseErrors Parser of error string messages returns RestError
Click to show internal directories.
Click to hide internal directories.