mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
*: key handler should write auth error as etcd error
This commit is contained in:
@@ -35,6 +35,7 @@ var errors = map[int]string{
|
||||
EcodeRootROnly: "Root is read only",
|
||||
EcodeDirNotEmpty: "Directory not empty",
|
||||
ecodeExistingPeerAddr: "Peer address has existed",
|
||||
EcodeUnauthorized: "The request requires user authentication",
|
||||
|
||||
// Post form related errors
|
||||
ecodeValueRequired: "Value is Required in POST form",
|
||||
@@ -68,6 +69,7 @@ var errorStatus = map[int]int{
|
||||
EcodeKeyNotFound: http.StatusNotFound,
|
||||
EcodeNotFile: http.StatusForbidden,
|
||||
EcodeDirNotEmpty: http.StatusForbidden,
|
||||
EcodeUnauthorized: http.StatusUnauthorized,
|
||||
EcodeTestFailed: http.StatusPreconditionFailed,
|
||||
EcodeNodeExist: http.StatusPreconditionFailed,
|
||||
EcodeRaftInternal: http.StatusInternalServerError,
|
||||
@@ -85,6 +87,7 @@ const (
|
||||
EcodeRootROnly = 107
|
||||
EcodeDirNotEmpty = 108
|
||||
ecodeExistingPeerAddr = 109
|
||||
EcodeUnauthorized = 110
|
||||
|
||||
ecodeValueRequired = 200
|
||||
EcodePrevValueRequired = 201
|
||||
|
||||
Reference in New Issue
Block a user