M shared/http/error.go →
shared/http/error.go StatusCode() int
Message() string
Unwrap() error
- WriteHTTP(w http.ResponseWriter)
}
type httpError struct {
func (e *httpError) Unwrap() error {
return e.cause
-}
-
-func (e *httpError) WriteHTTP(w http.ResponseWriter) {
- http.Error(w, e.message, e.code)
}
func NewError(code int, message string, cause error) Error {