1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00
wakapi/middlewares/sentry.go

15 lines
282 B
Go
Raw Normal View History

package middlewares
import (
sentryhttp "github.com/getsentry/sentry-go/http"
"net/http"
)
func NewSentryMiddleware() func(http.Handler) http.Handler {
return func(h http.Handler) http.Handler {
return sentryhttp.New(sentryhttp.Options{
Repanic: true,
}).Handle(h)
}
}