cluster block failure should return 503 status code

This commit is contained in:
Shay Banon 2012-01-05 20:58:23 +02:00
parent e38d80288b
commit fcb96fdd1b
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
}