From d4a389279c24dfdd860a0a90af5778bde64cb66c Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 11 Feb 2024 15:29:23 +0100 Subject: [PATCH] chore: don't send http errors with a status < 500 to sentry --- pkg/routes/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index 88e40211a3..f9813850a3 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -151,7 +151,7 @@ func setupSentry(e *echo.Echo) { e.HTTPErrorHandler = func(err error, c echo.Context) { // Only capture errors not already handled by echo var herr *echo.HTTPError - if errors.As(err, &herr) && herr.Code > 403 { + if errors.As(err, &herr) && herr.Code > 499 { hub := sentryecho.GetHubFromContext(c) if hub != nil { hub.WithScope(func(scope *sentry.Scope) {