From c16860e7cd79ce0cd648ab609f0cd706cc303be5 Mon Sep 17 00:00:00 2001 From: realanna Date: Thu, 9 Mar 2023 10:20:47 +0100 Subject: [PATCH] fix:review Signed-off-by: realanna --- metrics-operator/pkg/metrics/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics-operator/pkg/metrics/server.go b/metrics-operator/pkg/metrics/server.go index e5cafba9ae..bf029f12b6 100644 --- a/metrics-operator/pkg/metrics/server.go +++ b/metrics-operator/pkg/metrics/server.go @@ -165,7 +165,7 @@ func (m *serverManager) returnMetric(w http.ResponseWriter, r *http.Request) { err = json.NewEncoder(w).Encode(data) if err != nil { fmt.Println("failed to encode data") - w.WriteHeader(422) + w.WriteHeader(http.StatusUnprocessableEntity) os.Exit(1) }