feat: Add panic recovery to application

This commit is contained in:
divyam234 2024-06-04 13:27:56 +05:30
parent bde8806a52
commit 75e7b6317b

View file

@ -132,6 +132,13 @@ func runApplication(conf *config.Config) {
controller.NewController,
),
)
defer func() {
if r := recover(); r != nil {
logging.FromContext(context.TODO()).Errorf("Recovered from panic: %v", r)
}
}()
app.Run()
}