chore: don't send http errors with a status < 500 to sentry

This commit is contained in:
kolaente 2024-02-11 15:29:23 +01:00
parent 3a65324a7d
commit d4a389279c
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

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