From 2b125bd6b4a79c80fa712c691da9a95a3c2051b9 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Thu, 5 Jan 2012 20:45:36 +0200 Subject: [PATCH] master not discovered should use 503 response code --- .../discovery/MasterNotDiscoveredException.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java b/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java index a40944cd3f2..218cecf83ee 100644 --- a/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java +++ b/src/main/java/org/elasticsearch/discovery/MasterNotDiscoveredException.java @@ -20,6 +20,7 @@ package org.elasticsearch.discovery; import org.elasticsearch.ElasticSearchException; +import org.elasticsearch.rest.RestStatus; /** * @@ -29,4 +30,9 @@ public class MasterNotDiscoveredException extends ElasticSearchException { public MasterNotDiscoveredException() { super(""); } + + @Override + public RestStatus status() { + return RestStatus.SERVICE_UNAVAILABLE; + } }