Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalServerError ¶
func InternalServerError(w http.ResponseWriter, msg string, logErr error)
The following functions are shorthand for creating and emitting the error all at once
func RequestAcceptsJSON ¶
Types ¶
type HttpError ¶
type HttpError struct { Skip int // callstack frames to skip for debug tracking Errs binding.Errors Msg string Code int LogMsg string }
func NewHttpError ¶
func NewHttpError() *HttpError
HttpError represents both the error to send to the user and the error to log.
func (*HttpError) InternalServerError ¶
func (*HttpError) Write ¶
func (herr *HttpError) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.