fix wrong error

release-0.4
Xiang Li 2013-08-03 22:56:39 -07:00
parent 9b8c5b0527
commit 8f551e3dc1
2 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@ func dispatch(c Command, w *http.ResponseWriter, req *http.Request, client bool)
if body == nil {
(*w).WriteHeader(http.StatusNotFound)
(*w).Write(newJsonError(100, ""))
(*w).Write(newJsonError(300, "Empty result from raft"))
} else {
body, ok := body.([]byte)
// this should not happen

View File

@ -20,6 +20,7 @@ func init() {
errors[201] = "PrevValue is Required in POST form"
errors[202] = "The given TTL in POST form is not a number"
errors[203] = "The given index in POST form is not a number"
// raft related errors
errors[300] = "Raft Internal Error"
errors[301] = "During Leader Election"