Skip to content

Commit c05f212

Browse files
authored
Catch inteface instead of class (#780)
1 parent 66df70b commit c05f212

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Response.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use AsyncAws\Core\Stream\ResultStream;
1919
use Psr\Log\LoggerInterface;
2020
use Psr\Log\LogLevel;
21-
use Symfony\Component\HttpClient\Exception\TransportException;
2221
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
2322
use Symfony\Contracts\HttpClient\HttpClientInterface;
2423
use Symfony\Contracts\HttpClient\ResponseInterface;
@@ -200,7 +199,7 @@ final public static function wait(iterable $responses, float $timeout = null, bo
200199
// Receiving a timeout mean all responses are inactive.
201200
break;
202201
}
203-
} catch (TransportException $e) {
202+
} catch (TransportExceptionInterface $e) {
204203
// Exception is stored as an array, because storing an instance of \Exception will create a circular
205204
// reference and prevent `__destruct` being called.
206205
$response->resolveResult = [NetworkException::class, ['Could not contact remote server.', 0, $e]];

0 commit comments

Comments
 (0)