Documentation
¶
Index ¶
- func EmptyRequestBody() error
- func MalformedPayload() error
- func NotFound(resource string) error
- func UnknownParameter(param string) error
- func UnsupportedMediaType() error
- func ValidationError(message string) error
- func ValidationFields(message string, fields map[string]string) error
- func ValidationTypeError(message string) error
- type Error
- type ErrorDetail
- type ErrorResponse
- type FieldError
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptyRequestBody ¶
func EmptyRequestBody() error
EmptyRequestBody reports a missing body on a request that requires one.
func MalformedPayload ¶
func MalformedPayload() error
MalformedPayload reports a request body that could not be decoded.
func UnknownParameter ¶
UnknownParameter reports a request parameter that is not part of the input type.
func UnsupportedMediaType ¶
func UnsupportedMediaType() error
UnsupportedMediaType reports an unsupported request content type.
func ValidationError ¶
ValidationError reports a request that failed validation.
func ValidationTypeError ¶
ValidationTypeError reports a value that could not be converted to the expected type.
Types ¶
type ErrorDetail ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error ErrorDetail `json:"error"`
}
ErrorResponse is the browser API's shared error contract.
type FieldError ¶
FieldError attaches field-specific messages while preserving the shared error code.
func (*FieldError) Error ¶
func (e *FieldError) Error() string
func (*FieldError) Unwrap ¶
func (e *FieldError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.