Nest original exception while creating NoShardAvailableActionException

Closes #7756
This commit is contained in:
Suyog Rao 2014-09-16 17:28:47 -07:00
parent 20a0c68964
commit 25bce1db5d
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ public abstract class TransportShardSingleOperationAction<Request extends Single
if (shardRouting == null) {
Throwable failure = lastFailure;
if (failure == null || isShardNotAvailableException(failure)) {
failure = new NoShardAvailableActionException(shardIt.shardId());
failure = new NoShardAvailableActionException(shardIt.shardId(), null, failure);
} else {
if (logger.isDebugEnabled()) {
logger.debug("{}: failed to execute [{}]", failure, shardIt.shardId(), internalRequest.request());