Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultErrorMessage = "Unexpected error happened. Please try again later."
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Message string `json:"message,omitempty"` Error string `json:"error,omitempty"` StatusCode int `json:"-"` }
func ByError ¶
func ByError(err error) ErrorResponse
func ByErrorAndStatus ¶
func ByErrorAndStatus(err error, status int) ErrorResponse
func NewCaptchaBadResponse ¶
func NewCaptchaBadResponse() ErrorResponse
func NewCaptchaErrorResponse ¶
func NewCaptchaErrorResponse(err error) ErrorResponse
func NewErrorResponse ¶
func NewErrorResponse(message string, err error, status int) ErrorResponse
func (ErrorResponse) Write ¶
func (e ErrorResponse) Write(ctx *fasthttp.RequestCtx)
Click to show internal directories.
Click to hide internal directories.