diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_localist/src/LocalistManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_localist/src/LocalistManager.php index b2898a0f3..366ef05c8 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_localist/src/LocalistManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_localist/src/LocalistManager.php @@ -14,6 +14,7 @@ use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\MigrationPluginManager; use GuzzleHttp\Client; +use GuzzleHttp\Exception\RequestException; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -204,7 +205,13 @@ public function getEndpointUrls($endpointType) { */ private function getMultiPageUrls($url) { $endpointUrls = []; - $response = $this->httpClient->get($url); + + try { + $response = $this->httpClient->get($url); + } + catch (RequestException $e) { + return $endpointUrls; + } $data = json_decode($response->getBody(), TRUE); $i = 1;