Skip to content

Commit

Permalink
fix(elasticsearch): skip metadata without ES nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
insekticid authored and soyuka committed Sep 5, 2022
1 parent 2db01c0 commit c814185
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use ApiPlatform\Util\Inflector;
use Elasticsearch\Client;
use Elasticsearch\Common\Exceptions\Missing404Exception;
use Elasticsearch\Common\Exceptions\NoNodesAvailableException;

final class ElasticsearchProviderResourceMetadataCollectionFactory implements ResourceMetadataCollectionFactoryInterface
{
Expand Down Expand Up @@ -97,6 +98,8 @@ private function hasIndices(string $shortName): bool
return true;
} catch (Missing404Exception $e) {
return false;
} catch (NoNodesAvailableException) {
return false;
}
}
}

0 comments on commit c814185

Please sign in to comment.