master not discovered should use 503 response code

This commit is contained in:
Shay Banon 2012-01-05 20:45:36 +02:00
parent a18021c778
commit 2b125bd6b4
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@
package org.elasticsearch.discovery; package org.elasticsearch.discovery;
import org.elasticsearch.ElasticSearchException; import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.rest.RestStatus;
/** /**
* *
@ -29,4 +30,9 @@ public class MasterNotDiscoveredException extends ElasticSearchException {
public MasterNotDiscoveredException() { public MasterNotDiscoveredException() {
super(""); super("");
} }
@Override
public RestStatus status() {
return RestStatus.SERVICE_UNAVAILABLE;
}
} }