mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-08 23:23:42 +08:00
fix: recover panic
This commit is contained in:
@@ -16,8 +16,8 @@ func RelayPanicRecover() gin.HandlerFunc {
|
||||
common.SysError(fmt.Sprintf("stacktrace from panic: %s", string(debug.Stack())))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{
|
||||
"error": gin.H{
|
||||
"message": fmt.Sprintf("Panic detected, error: %v. Please submit a issue here: https://github.com/songquanpeng/one-api", err),
|
||||
"type": "one_api_panic",
|
||||
"message": fmt.Sprintf("Panic detected, error: %v. Please submit a issue here: https://github.com/Calcium-Ion/new-api", err),
|
||||
"type": "new_api_panic",
|
||||
},
|
||||
})
|
||||
c.Abort()
|
||||
|
||||
Reference in New Issue
Block a user