feat:panic recover
This commit is contained in:
parent
07ebbdbe1b
commit
2917d38e59
|
|
@ -18,6 +18,7 @@ import (
|
|||
|
||||
"github.com/go-co-op/gocron"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||
futils "github.com/gofiber/fiber/v2/utils"
|
||||
"github.com/rs/zerolog"
|
||||
"go.uber.org/fx"
|
||||
|
|
@ -37,6 +38,11 @@ func NewFiber(cfg *config.Config) *fiber.App {
|
|||
DisableStartupMessage: true,
|
||||
ReadBufferSize: 8192,
|
||||
})
|
||||
|
||||
// ==============================
|
||||
app.Use(recover.New(recover.Config{
|
||||
EnableStackTrace: true,
|
||||
}))
|
||||
|
||||
// pass production config to check it
|
||||
response.IsProduction = cfg.App.Production
|
||||
|
|
|
|||
Loading…
Reference in New Issue