Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPError ¶
type HTTPError struct {
StatusCode int `json:"-"`
Message interface{} `json:"message"`
}
HTTPError represents an http error that occurred while handling a request
func New ¶
New creates a new HTTPError instance message can be an error, the error message is then used as message the message is optional but multiple messages are not supported
type WritableError ¶
type WritableError interface {
error
WriteJSON(w http.ResponseWriter) error
}
WritableError is an interface for errors that can be written to http responses as JSON
Click to show internal directories.
Click to hide internal directories.