Update http error code when datasource health check fails (#37895) (#37914)

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.

(cherry picked from commit db2e0d46b7)

Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2021-08-18 21:35:06 +02:00
committed by GitHub
co-authored by Stephanie Hingtgen
parent cfeb21b12c
commit 17219bf052
+1 -1
View File
@@ -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)