Skip to content

Commit

Permalink
Update PendingRequest.php (#48900)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdebrauwer authored Nov 3, 2023
1 parent e5e67c4 commit 3d37d78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Http/Client/PendingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,10 @@ protected function makePromise(string $method, string $url, array $options = [])
});
})
->otherwise(function (TransferException $e) {
if ($e instanceof ConnectException) {
$this->dispatchConnectionFailedEvent();
}

return $e instanceof RequestException && $e->hasResponse() ? $this->populateResponse($this->newResponse($e->getResponse())) : $e;
});
}
Expand Down

0 comments on commit 3d37d78

Please sign in to comment.