chore: don't send http errors with a status < 500 to sentry
This commit is contained in:
parent
3a65324a7d
commit
d4a389279c
@ -151,7 +151,7 @@ func setupSentry(e *echo.Echo) {
|
|||||||
e.HTTPErrorHandler = func(err error, c echo.Context) {
|
e.HTTPErrorHandler = func(err error, c echo.Context) {
|
||||||
// Only capture errors not already handled by echo
|
// Only capture errors not already handled by echo
|
||||||
var herr *echo.HTTPError
|
var herr *echo.HTTPError
|
||||||
if errors.As(err, &herr) && herr.Code > 403 {
|
if errors.As(err, &herr) && herr.Code > 499 {
|
||||||
hub := sentryecho.GetHubFromContext(c)
|
hub := sentryecho.GetHubFromContext(c)
|
||||||
if hub != nil {
|
if hub != nil {
|
||||||
hub.WithScope(func(scope *sentry.Scope) {
|
hub.WithScope(func(scope *sentry.Scope) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user