u
This commit is contained in:
1 parent
7552670e4a
commit
01ea998605
13 files changed
+173
-45
No files matched your search
@@ -3,7 +3,6 @@ package middleware
|
||||
import (
|
||||
"base-framework/pkg/router"
|
||||
"log"
|
||||
"net/http"
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
@@ -12,9 +11,6 @@ func Recover() router.HandlerFunc {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
log.Printf("[PANIC] %v\n%s", err, debug.Stack())
|
||||
c.JSON(http.StatusInternalServerError, map[string]string{
|
||||
"error": "Internal Server Error",
|
||||
})
|
||||
}
|
||||
}()
|
||||
c.Next()
|
||||
|
||||
Reference in new issue
Block a user