router(transfer): throw error if server fails to stop
This commit is contained in:
parent
6e0c095bb8
commit
a36cab1783
|
@ -6,6 +6,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"emperror.dev/errors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
|
||||||
"github.com/pterodactyl/wings/environment"
|
"github.com/pterodactyl/wings/environment"
|
||||||
|
@ -67,7 +68,7 @@ func postServerTransfer(c *gin.Context) {
|
||||||
false,
|
false,
|
||||||
); err != nil && !strings.Contains(strings.ToLower(err.Error()), "no such container") {
|
); err != nil && !strings.Contains(strings.ToLower(err.Error()), "no such container") {
|
||||||
s.SetTransferring(false)
|
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
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user