Documentation ¶
Overview ¶
Package errs provides types and support related to web error functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTrusted ¶
NewTrusted wraps a provided error with an HTTP status code. This function should be used when handlers encounter expected errors.
Types ¶
type Response ¶
type Response struct { Error string `json:"error"` Fields map[string]string `json:"fields,omitempty"` }
Response is the form used for API responses from failures in the API.
type Trusted ¶
Trusted is used to pass an error during the request through the application with web specific context.
func GetTrusted ¶
GetTrusted returns a copy of the TrustedError pointer.
Click to show internal directories.
Click to hide internal directories.