From fcb96fdd1bdfb7cd0ee5bc78286ac22f20d20583 Mon Sep 17 00:00:00 2001 From: Shay Banon <kimchy@gmail.com> Date: Thu, 5 Jan 2012 20:58:23 +0200 Subject: [PATCH] cluster block failure should return 503 status code --- .../elasticsearch/cluster/block/ClusterBlockException.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java b/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java index 1ee48055254..0151360c5f8 100644 --- a/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java +++ b/src/main/java/org/elasticsearch/cluster/block/ClusterBlockException.java @@ -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; + } }