Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit abe8f85

Browse files
committed
Catches the proper exception
1 parent ef8f05a commit abe8f85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Guzzle5HttpAdapter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use GuzzleHttp\ClientInterface;
1616
use GuzzleHttp\Event\CompleteEvent;
1717
use GuzzleHttp\Event\ErrorEvent;
18+
use GuzzleHttp\Exception\RequestException;
1819
use GuzzleHttp\Message\RequestInterface;
1920
use GuzzleHttp\Pool;
2021
use Http\Adapter\Message\InternalRequestInterface;
@@ -57,7 +58,7 @@ protected function sendInternalRequest(InternalRequestInterface $internalRequest
5758
{
5859
try {
5960
$response = $this->client->send($this->createRequest($internalRequest));
60-
} catch (\Exception $e) {
61+
} catch (RequestException $e) {
6162
throw HttpAdapterException::cannotFetchUri(
6263
$e->getRequest()->getUrl(),
6364
$this->getName(),

0 commit comments

Comments
 (0)