fix(sentry): send unwrapped error to sentry instead of http error

This commit is contained in:
kolaente 2024-03-03 17:36:57 +01:00 committed by Daniel Herrmann
parent 638f92a0cd
commit a403fbf8de

View File

@ -156,10 +156,10 @@ func setupSentry(e *echo.Echo) {
if hub != nil { if hub != nil {
hub.WithScope(func(scope *sentry.Scope) { hub.WithScope(func(scope *sentry.Scope) {
scope.SetExtra("url", c.Request().URL) scope.SetExtra("url", c.Request().URL)
hub.CaptureException(err) hub.CaptureException(herr.Internal)
}) })
} else { } else {
sentry.CaptureException(err) sentry.CaptureException(herr.Internal)
log.Debugf("Could not add context for sending error '%s' to sentry", err.Error()) log.Debugf("Could not add context for sending error '%s' to sentry", err.Error())
} }
log.Debugf("Error '%s' sent to sentry", err.Error()) log.Debugf("Error '%s' sent to sentry", err.Error())