From c0c523f0a8c83eb164febbc508ac98142d572d7a Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 13 Mar 2023 10:52:52 +0100 Subject: [PATCH] fix: don't send bad request errors 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 53eabe88c..d2948e743 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -128,7 +128,7 @@ func NewEcho() *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) { + if errors.As(err, &herr) && herr.Code > 403 { hub := sentryecho.GetHubFromContext(c) if hub != nil { hub.WithScope(func(scope *sentry.Scope) {