Fix file repository not catching 404 responses (#4637)
This commit is contained in:
parent
dd595437e6
commit
c74314d2ab
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ use Illuminate\Support\Arr;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use GuzzleHttp\Exception\ClientException;
|
||||||
use GuzzleHttp\Exception\TransferException;
|
use GuzzleHttp\Exception\TransferException;
|
||||||
use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException;
|
use Pterodactyl\Exceptions\Http\Server\FileSizeTooLargeException;
|
||||||
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
|
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
|
||||||
|
@ -32,7 +33,7 @@ class DaemonFileRepository extends DaemonRepository
|
||||||
'query' => ['file' => $path],
|
'query' => ['file' => $path],
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (TransferException $exception) {
|
} catch (ClientException|TransferException $exception) {
|
||||||
throw new DaemonConnectionException($exception);
|
throw new DaemonConnectionException($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue