Add debug logs when a non-500 error occurs, force sync the configuration during installation of a new server
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/pterodactyl/wings/config"
|
||||
"github.com/pterodactyl/wings/server"
|
||||
"go.uber.org/zap"
|
||||
"net/http"
|
||||
@@ -68,6 +69,12 @@ func (e *RequestError) AbortWithStatus(status int, c *gin.Context) {
|
||||
}
|
||||
|
||||
c.Error(errors.WithStack(e))
|
||||
} else if config.Get().Debug {
|
||||
if e.server != nil {
|
||||
zap.S().Debugw("encountered error while handling HTTP request", zap.String("server", e.server.Uuid), zap.String("error_id", e.Uuid), zap.Error(e.Err))
|
||||
} else {
|
||||
zap.S().Debugw("encountered error while handling HTTP request", zap.String("error_id", e.Uuid), zap.Error(e.Err))
|
||||
}
|
||||
}
|
||||
|
||||
msg := "An unexpected error was encountered while processing this request."
|
||||
|
||||
Reference in New Issue
Block a user