replace tozd/errors with Southclaws/fault
1 file changed, 4 insertions(+), 3 deletions(-)
changed files
M internal/stats/goatcounter/count.go → internal/stats/goatcounter/count.go
@@ -8,7 +8,8 @@ "io" "net/http" "time" - "gitlab.com/tozd/go/errors" + "github.com/Southclaws/fault" + "github.com/Southclaws/fault/fmsg" "go.alanpearce.eu/homestead/internal/config" "go.alanpearce.eu/x/log" )@@ -69,7 +70,7 @@ gc.log.Warn("could not log page view", "error", err) } } -func (gc *Goatcounter) count(userReq *http.Request, title string) errors.E { +func (gc *Goatcounter) count(userReq *http.Request, title string) error { body, err := json.Marshal(&countBody{ NoSessions: true, Hits: []hit{@@ -84,7 +85,7 @@ }, }, }) if err != nil { - return errors.WithMessage(err, "could not marshal JSON") + return fault.Wrap(err, fmsg.With("could not marshal JSON")) } go func(body []byte) {