This document describes the error code used in key space ‘/v2/keys’. Feel free to import ‘github.com/coreos/etcd/error’ to use.

It’s categorized into four groups:

  • Command Related Error
namecodestrerror
EcodeKeyNotFound100“Key not found”
EcodeTestFailed101“Compare failed”
EcodeNotFile102“Not a file”
EcodeNotDir104“Not a directory”
EcodeNodeExist105“Key already exists”
EcodeRootROnly107“Root is read only”
EcodeDirNotEmpty108“Directory not empty”
  • Post Form Related Error
namecodestrerror
EcodePrevValueRequired201“PrevValue is Required in POST form”
EcodeTTLNaN202“The given TTL in POST form is not a number”
EcodeIndexNaN203“The given index in POST form is not a number”
EcodeInvalidField209“Invalid field”
EcodeInvalidForm210“Invalid POST form”
  • Raft Related Error
namecodestrerror
EcodeRaftInternal300“Raft Internal Error”
EcodeLeaderElect301“During Leader Election”
  • Etcd Related Error
namecodestrerror
EcodeWatcherCleared400“watcher is cleared due to etcd recovery”
EcodeEventIndexCleared401“The event in requested index is outdated and cleared”