From c74314d2ab344a5771c753d3f786e9afabb1c1bb Mon Sep 17 00:00:00 2001 From: Jelco <53396500+Jelcoo@users.noreply.github.com> Date: Tue, 17 Jan 2023 23:12:22 +0100 Subject: [PATCH] Fix file repository not catching 404 responses (#4637) --- app/Repositories/Wings/DaemonFileRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Repositories/Wings/DaemonFileRepository.php b/app/Repositories/Wings/DaemonFileRepository.php index 77949478f..ca757151e 100644 --- a/app/Repositories/Wings/DaemonFileRepository.php +++ b/app/Repositories/Wings/DaemonFileRepository.php @@ -6,6 +6,7 @@ use Illuminate\Support\Arr; use Webmozart\Assert\Assert; use Pterodactyl\Models\Server; use Psr\Http\Message\ResponseInterface; +use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\TransferException; use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException; use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException; @@ -32,7 +33,7 @@ class DaemonFileRepository extends DaemonRepository 'query' => ['file' => $path], ] ); - } catch (TransferException $exception) { + } catch (ClientException|TransferException $exception) { throw new DaemonConnectionException($exception); }