summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java')
-rw-r--r--core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java b/core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java
index 17d8bcfb99..676949e367 100644
--- a/core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java
+++ b/core/src/main/java/org/elasticsearch/action/support/DefaultShardOperationFailedException.java
@@ -48,7 +48,7 @@ public class DefaultShardOperationFailedException implements ShardOperationFaile
}
public DefaultShardOperationFailedException(ElasticsearchException e) {
- this.index = e.getIndex();
+ this.index = e.getIndex() == null ? null : e.getIndex().getName();
this.shardId = e.getShardId().id();
this.reason = e;
this.status = e.status();