From 817c5d6f9928a96276b46073503a7ab47289b514 Mon Sep 17 00:00:00 2001 From: Artem Prigoda Date: Wed, 22 Sep 2021 14:03:58 +0200 Subject: [PATCH] Return correct HTTP code for a server timeout on `_cluster/health` Fixes #70849 --- .../action/admin/cluster/health/ClusterHealthResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java index 385a4ce827ed8..2c0360493ec6e 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthResponse.java @@ -299,7 +299,7 @@ public String toString() { @Override public RestStatus status() { - return isTimedOut() ? RestStatus.REQUEST_TIMEOUT : RestStatus.OK; + return RestStatus.OK; } @Override