From 37cfa151b630a207ec16024732da0a18d62ccb47 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Thu, 17 Dec 2020 10:37:14 -0700 Subject: [PATCH] Use ServerTransferringException --- .../Middleware/Api/Client/Server/AuthenticateServerAccess.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php b/app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php index 5dae378d4..16713b77b 100644 --- a/app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php +++ b/app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php @@ -9,6 +9,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; use Symfony\Component\HttpKernel\Exception\ConflictHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +use Pterodactyl\Exceptions\Http\Server\ServerTransferringException; class AuthenticateServerAccess { @@ -81,7 +82,7 @@ class AuthenticateServerAccess if (! is_null($server->transfer)) { if (! $user->root_admin || ($user->root_admin && ! $request->routeIs($this->except))) { - throw new ConflictHttpException('Server is currently being transferred.'); + throw new ServerTransferringException(); } } }