Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2021 Changes in this version + const LogAllErrors + const LogNoErrors + const LogUnknownErrors + var BadRequest = P + var Default = New(DefaultServiceHost, DefaultLogger, LogAllErrors) + var DefaultLogger = log.DefaultLogger + var DefaultServiceHost = "https://stellar.org/horizon-errors/" + var NotFound = P + var ServerError = P + func IsKnownError(err error) error + func RegisterError(err error, p P) + func RegisterHost(host string) + func RegisterReportFunc(fn ReportFunc) + func Render(ctx context.Context, w http.ResponseWriter, err error) + func UnRegisterErrors() + type LogFilter int + type P struct + Detail string + Extras map[string]interface{} + Status int + Title string + Type string + func MakeInvalidFieldProblem(name string, reason error) *P + func NewProblemWithInvalidField(p P, name string, reason error) *P + func (p P) Error() string + type Problem struct + func New(serviceHost string, log *log.Entry, filter LogFilter) *Problem + func (ps *Problem) IsKnownError(err error) error + func (ps *Problem) RegisterError(err error, p P) + func (ps *Problem) RegisterHost(host string) + func (ps *Problem) RegisterReportFunc(fn ReportFunc) + func (ps *Problem) Render(ctx context.Context, w http.ResponseWriter, err error) + func (ps *Problem) ServiceHost() string + func (ps *Problem) UnRegisterErrors() + type ReportFunc func(context.Context, error)