Skip to content

Commit aacd066

Browse files
Update PendingRequest.php (#48939)
* Update PendingRequest.php This fixes #48938 by making the parameter a union type and adding `OutOfBoundsException`. * Update PendingRequest.php Fix styling. * Update PendingRequest.php * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 02b77ff commit aacd066

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Http/Client/PendingRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Illuminate\Support\Traits\Conditionable;
2424
use Illuminate\Support\Traits\Macroable;
2525
use JsonSerializable;
26+
use OutOfBoundsException;
2627
use Psr\Http\Message\MessageInterface;
2728
use Psr\Http\Message\RequestInterface;
2829
use RuntimeException;
@@ -1007,7 +1008,7 @@ protected function makePromise(string $method, string $url, array $options = [])
10071008
$this->dispatchResponseReceivedEvent($response);
10081009
});
10091010
})
1010-
->otherwise(function (TransferException $e) {
1011+
->otherwise(function (OutOfBoundsException|TransferException $e) {
10111012
if ($e instanceof ConnectException) {
10121013
$this->dispatchConnectionFailedEvent();
10131014
}

0 commit comments

Comments
 (0)