mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Don't wrap the exception in an ElasticSearchException when shard isn't available.
This commit is contained in:
parent
f307336670
commit
ae3f54bdb5
@ -103,12 +103,12 @@ public class TransportShardMultiPercolateAction extends TransportShardSingleOper
|
||||
int slot = item.slot;
|
||||
try {
|
||||
responseItem = new Response.Item(slot, percolatorService.percolate(item.request));
|
||||
} catch (Throwable e) {
|
||||
logger.debug("[{}][{}] failed to multi percolate", e, request.index(), request.shardId());
|
||||
if (TransportActions.isShardNotAvailableException(e)) {
|
||||
throw new ElasticSearchException("", e);
|
||||
} catch (Throwable t) {
|
||||
if (TransportActions.isShardNotAvailableException(t)) {
|
||||
throw (ElasticSearchException) t;
|
||||
} else {
|
||||
responseItem = new Response.Item(slot, new StringText(ExceptionsHelper.detailedMessage(e)));
|
||||
logger.debug("[{}][{}] failed to multi percolate", t, request.index(), request.shardId());
|
||||
responseItem = new Response.Item(slot, new StringText(ExceptionsHelper.detailedMessage(t)));
|
||||
}
|
||||
}
|
||||
response.items.add(responseItem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user