Skip to content

Commit

Permalink
When Building docker image, no ES client is available
Browse files Browse the repository at this point in the history
  • Loading branch information
insekticid authored Sep 4, 2022
1 parent 5ef1d61 commit 91d0c7f
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 @@ -88,6 +89,8 @@ private function hasIndices(string $shortName): bool
return true;
} catch (Missing404Exception) {
return false;
} catch (NoNodesAvailableException) {
return false;
}
}
}

0 comments on commit 91d0c7f

Please sign in to comment.