Skip to content

Commit c74314d

Browse files
authored
Fix file repository not catching 404 responses (pterodactyl#4637)
1 parent dd59543 commit c74314d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Repositories/Wings/DaemonFileRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Webmozart\Assert\Assert;
77
use Pterodactyl\Models\Server;
88
use Psr\Http\Message\ResponseInterface;
9+
use GuzzleHttp\Exception\ClientException;
910
use GuzzleHttp\Exception\TransferException;
1011
use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException;
1112
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
@@ -32,7 +33,7 @@ public function getContent(string $path, int $notLargerThan = null): string
3233
'query' => ['file' => $path],
3334
]
3435
);
35-
} catch (TransferException $exception) {
36+
} catch (ClientException|TransferException $exception) {
3637
throw new DaemonConnectionException($exception);
3738
}
3839

0 commit comments

Comments
 (0)