Skip to content

Commit

Permalink
Fix: sentry level
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jan 31, 2022
1 parent ab25808 commit e370076
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/helpers/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func SetUserIDSentry(id string) {
// CatchPanicSentry -
func CatchPanicSentry() {
if err := recover(); err != nil {
sentry.CurrentHub().WithScope(func(scope *sentry.Scope) {
scope.SetLevel(sentry.LevelError)
})
sentry.CurrentHub().Recover(err)
sentry.Flush(time.Second * 5)
}
Expand Down

0 comments on commit e370076

Please sign in to comment.