diff --git a/src/Request/Request.php b/src/Request/Request.php index be42f268b..1ec7274a4 100755 --- a/src/Request/Request.php +++ b/src/Request/Request.php @@ -244,6 +244,7 @@ private function createRetryDecider(): callable } } + // It's been observed in the wild that sometimes $response is null. Get a different error message in that case. if (is_object($response) && is_object($response->getBody()) && $response->getBody()->getContents() !== '') { $error = $response->getBody()->getContents(); } elseif (null !== $exception && '' != $exception->getMessage()) {