Skip to content

Commit 37cfa15

Browse files
committed
Use ServerTransferringException
1 parent e69d9b2 commit 37cfa15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
1010
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
1111
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
12+
use Pterodactyl\Exceptions\Http\Server\ServerTransferringException;
1213

1314
class AuthenticateServerAccess
1415
{
@@ -81,7 +82,7 @@ public function handle(Request $request, Closure $next)
8182

8283
if (! is_null($server->transfer)) {
8384
if (! $user->root_admin || ($user->root_admin && ! $request->routeIs($this->except))) {
84-
throw new ConflictHttpException('Server is currently being transferred.');
85+
throw new ServerTransferringException();
8586
}
8687
}
8788
}

0 commit comments

Comments
 (0)