/** * Helper method to get results even when the world is against you... I AM NOT DRAMATIC * * @param string $url * @param Query $query * * @return ResponseInterface */ protected function fetchResponse($url, $query) { try { $response = $this->client->get($url, ['query' => $query->toArray()]); } catch (\GuzzleHttp\Exception\ServerException $e) { $response = $this->fetchResponse($url, $query); } return $response; }