@@ -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
@@ -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"