|
throw (ElasticsearchException) e; |
TransportActions.isShardNotAvailableException() is also true for Lucene's AlreadyClosedException, which is not ElasticsearchException sub-class.
When that happens CCE will be thrown instead of re-throwing the actual exception.