mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-27 23:40:41 +01:00
better error message
This commit is contained in:
1 parent
b23e51f205
commit
6f606bb350
1 file changed
+3
-1
@@ -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})
|
||||
|
||||
Reference in new issue
Block a user