diff --git a/client_handlers.go b/client_handlers.go index 4c6c2cf90..6b1142b8e 100644 --- a/client_handlers.go +++ b/client_handlers.go @@ -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 diff --git a/error.go b/error.go index 6d774949f..86442311a 100644 --- a/error.go +++ b/error.go @@ -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"