Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteError ¶
func WriteError(err error, writer http.ResponseWriter)
WriteError writes the specified error to the writer. It translates the error to a HTTP status code.
Types ¶
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError is the error and message to respond with.
func ToHTTPError ¶
ErrorToHTTPError translates an error to an HTTPError. It translates an error to an HTTP status code.
func (*HTTPError) Write ¶
func (e *HTTPError) Write(response http.ResponseWriter)
Write writes the HTTPError to the ResponseWriter
Click to show internal directories.
Click to hide internal directories.