Skip to content

Commit

Permalink
router(transfer): throw error if server fails to stop
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpi committed Jan 24, 2023
1 parent 6e0c095 commit a36cab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion router/router_server_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"
"time"

"emperror.dev/errors"
"github.com/gin-gonic/gin"

"github.com/pterodactyl/wings/environment"
Expand Down Expand Up @@ -67,7 +68,7 @@ func postServerTransfer(c *gin.Context) {
false,
); err != nil && !strings.Contains(strings.ToLower(err.Error()), "no such container") {
s.SetTransferring(false)
s.Log().WithError(err).Error("failed to stop server for transfer")
middleware.CaptureAndAbort(c, errors.Wrap(err, "failed to stop server for transfer"))
return
}
}
Expand Down

0 comments on commit a36cab1

Please sign in to comment.