From 6f606bb35072160b4e030e41d0cf4bb5113e9242 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 13 Nov 2012 12:13:12 -0800 Subject: [PATCH] better error message --- weed-fs/src/cmd/weed/master.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed-fs/src/cmd/weed/master.go b/weed-fs/src/cmd/weed/master.go index b2b114a35..2adaadeaf 100644 --- a/weed-fs/src/cmd/weed/master.go +++ b/weed-fs/src/cmd/weed/master.go @@ -153,11 +153,13 @@ func volumeGrowHandler(w http.ResponseWriter, r *http.Request) { } else { count, err = vg.GrowByCountAndType(count, rt, topo) } + }else{ + err = errors.New("parameter count is not found") } } if err != nil { w.WriteHeader(http.StatusNotAcceptable) - writeJson(w, r, map[string]string{"error": err.Error()}) + writeJson(w, r, map[string]string{"error": "parameter replication "+err.Error()}) } else { w.WriteHeader(http.StatusNotAcceptable) writeJson(w, r, map[string]interface{}{"count": count})