mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix wrong error
This commit is contained in:
parent
9b8c5b0527
commit
8f551e3dc1
@ -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
|
||||
|
1
error.go
1
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user