Commit
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"nCovTrack-Backend/utils"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -33,7 +34,7 @@ func GinRecovery(stack bool) gin.HandlerFunc {
|
||||
"error", interface{}(err),
|
||||
)
|
||||
if brokenPipe {
|
||||
utils.RequestLogPanic(logParams...)
|
||||
utils.RequestLogError(logParams...)
|
||||
c.Error(err.(error))
|
||||
c.Abort()
|
||||
return
|
||||
@@ -46,8 +47,9 @@ func GinRecovery(stack bool) gin.HandlerFunc {
|
||||
"stack", string(debug.Stack()),
|
||||
)
|
||||
}
|
||||
utils.RequestLogPanic(logParams...)
|
||||
utils.RequestLogError(logParams...)
|
||||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
fmt.Printf("\n%s\n", debug.Stack())
|
||||
}
|
||||
}()
|
||||
c.Next()
|
||||
|
||||
Reference in New Issue
Block a user