aboutsummaryrefslogtreecommitdiff
path: root/weed/server/master_server_handlers_admin.go
diff options
context:
space:
mode:
authorLei Liu <lei01.liu@horizon.ai>2019-10-31 20:43:20 +0800
committerLei Liu <lei01.liu@horizon.ai>2019-10-31 20:43:20 +0800
commit1294999d8b60b6ee8f562264c19caa95391371b0 (patch)
treecc5c6fb841ebf5391dd09cad0126b211a62d367b /weed/server/master_server_handlers_admin.go
parent1bcef02a6c730d7d8287e03c5226a61ff6e220a3 (diff)
downloadseaweedfs-1294999d8b60b6ee8f562264c19caa95391371b0.tar.xz
seaweedfs-1294999d8b60b6ee8f562264c19caa95391371b0.zip
return error when garbageThreshold is not a valid float number
Signed-off-by: Lei Liu <lei01.liu@horizon.ai>
Diffstat (limited to 'weed/server/master_server_handlers_admin.go')
-rw-r--r--weed/server/master_server_handlers_admin.go1
1 files changed, 1 insertions, 0 deletions
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
}
}