Versions in this module Expand all Collapse all v0 v0.1.0 Sep 14, 2026 Changes in this version + const ContentType + func Write(w http.ResponseWriter, p Problem) error + type Error struct + func MakeError(tmpl Template, cause error) *Error + func MakeInvalidRequest(status int, cause error, params ...InvalidParam) *Error + func (e *Error) Error() string + func (e *Error) Unwrap() error + type InvalidParam struct + Code string + Message string + Path string + func TypeParam(path string, target reflect.Type) InvalidParam + type Mapper struct + func MakeMapper(rules ...Rule) (*Mapper, error) + func (m *Mapper) Map(r *http.Request, err error) Problem + func (m *Mapper) MapKnown(r *http.Request, err error) (Problem, bool) + type Problem struct + Code string + Detail string + Errors []InvalidParam + Header http.Header + Instance string + Status int + Title string + Type string + func MakeProblem(r *http.Request, tmpl Template) Problem + func (p Problem) Response() response.Response + type Rule struct + func ErrorRule() Rule + func InputProblemRule() Rule + func When(match func(error) (Template, bool)) Rule + func WhenAs[E error](makeTemplate func(E) Template) Rule + func WhenIs(target error, tmpl Template) Rule + type Template struct + Code string + Detail string + Errors []InvalidParam + Header http.Header + Status int + Title string + Type string + func InvalidRequest(status int, params ...InvalidParam) Template