fix: don't send bad request errors to sentry
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2023-03-13 10:52:52 +01:00
parent 672fb35bcb
commit c0c523f0a8
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -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) {