From db2e0d46b7b4f802619703e80a1003111f00f4e3 Mon Sep 17 00:00:00 2001 From: Stephanie Hingtgen Date: Mon, 16 Aug 2021 00:49:34 -0600 Subject: [PATCH] Update http error code when datasource health check fails (#37895) Since the datasource settings are configured by the user, the health check error could be a client error. A 506 error may be sufficient as well. --- pkg/api/datasources.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/datasources.go b/pkg/api/datasources.go index d3ed473f28a..b80654d59f9 100644 --- a/pkg/api/datasources.go +++ b/pkg/api/datasources.go @@ -477,7 +477,7 @@ func (hs *HTTPServer) CheckDatasourceHealth(c *models.ReqContext) response.Respo } if resp.Status != backend.HealthStatusOk { - return response.JSON(503, payload) + return response.JSON(400, payload) } return response.JSON(200, payload)