From 1294999d8b60b6ee8f562264c19caa95391371b0 Mon Sep 17 00:00:00 2001 From: Lei Liu Date: Thu, 31 Oct 2019 20:43:20 +0800 Subject: [PATCH] return error when garbageThreshold is not a valid float number Signed-off-by: Lei Liu --- weed/server/master_server_handlers_admin.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go index 42ec50dd5..a5d976008 100644 --- a/weed/server/master_server_handlers_admin.go +++ b/weed/server/master_server_handlers_admin.go @@ -57,6 +57,7 @@ func (ms *MasterServer) volumeVacuumHandler(w http.ResponseWriter, r *http.Reque gcThreshold, err = strconv.ParseFloat(gcString, 32) if err != nil { glog.V(0).Infof("garbageThreshold %s is not a valid float number: %v", gcString, err) + writeJsonError(w, r, http.StatusNotAcceptable, fmt.Errorf("garbageThreshold %s is not a valid float number", gcString)) return } }