From c956d7ec775d4deec4afa821112b0b59149d9cc5 Mon Sep 17 00:00:00 2001 From: Zhang Zhe Date: Thu, 11 Jul 2024 10:42:01 +0800 Subject: [PATCH] fix: fix the bad variable reference (#2984) Signed-off-by: ZhangZhe --- internal/server/meta_init.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/server/meta_init.go b/internal/server/meta_init.go index 00c5728aa7..46364a76cf 100644 --- a/internal/server/meta_init.go +++ b/internal/server/meta_init.go @@ -240,7 +240,7 @@ func sourceConfKeyHandler(w http.ResponseWriter, r *http.Request) { case http.MethodPut: v, err1 := io.ReadAll(r.Body) if err1 != nil { - handleError(w, err, "Invalid body", logger) + handleError(w, err1, "Invalid body", logger) return } err = meta.AddSourceConfKey(pluginName, confKey, language, v) @@ -265,7 +265,7 @@ func sinkConfKeyHandler(w http.ResponseWriter, r *http.Request) { case http.MethodPut: v, err1 := io.ReadAll(r.Body) if err1 != nil { - handleError(w, err, "Invalid body", logger) + handleError(w, err1, "Invalid body", logger) return } err = meta.AddSinkConfKey(pluginName, confKey, language, v) @@ -296,7 +296,7 @@ func connectionConfKeyHandler(w http.ResponseWriter, r *http.Request) { reqField := make(map[string]interface{}) err = json.Unmarshal(v, &reqField) if err != nil { - handleError(w, err1, "Invalid body", logger) + handleError(w, err, "Invalid body", logger) return } reqField = replacePasswdForConfig("connection", confKey, reqField)