diff --git a/src/Middleware/EventDispatchMiddleware.php b/src/Middleware/EventDispatchMiddleware.php index 77eaf7b..216dd55 100644 --- a/src/Middleware/EventDispatchMiddleware.php +++ b/src/Middleware/EventDispatchMiddleware.php @@ -6,7 +6,7 @@ use EightPoints\Bundle\GuzzleBundle\Events\GuzzleEvents; use EightPoints\Bundle\GuzzleBundle\Events\PostTransactionEvent; use EightPoints\Bundle\GuzzleBundle\Events\PreTransactionEvent; -use Exception; +use Throwable; use GuzzleHttp\Exception\RequestException; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; @@ -70,7 +70,7 @@ function (ResponseInterface $response) { // Continue down the chain. return $postTransactionEvent->getTransaction(); }, - function (Exception $reason) { + function (Throwable $reason) { // Get the response. The response in a RequestException can be null too. $response = $reason instanceof RequestException ? $reason->getResponse() : null;