cluster block failure should return 503 status code
This commit is contained in:
parent
e38d80288b
commit
fcb96fdd1b
|
@ -21,6 +21,7 @@ package org.elasticsearch.cluster.block;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.elasticsearch.ElasticSearchException;
|
||||
import org.elasticsearch.rest.RestStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -54,4 +55,9 @@ public class ClusterBlockException extends ElasticSearchException {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestStatus status() {
|
||||
return RestStatus.SERVICE_UNAVAILABLE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue