{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/5264","repository_url":"https://api.github.com/repos/coreos/etcd","labels_url":"https://api.github.com/repos/coreos/etcd/issues/5264/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/5264/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/5264/events","html_url":"https://github.com/coreos/etcd/issues/5264","id":152893857,"number":5264,"title":"Golang client returns empty node for non-existing path","user":{"login":"bestofmukul","id":1292909,"avatar_url":"https://avatars.githubusercontent.com/u/1292909?v=3","gravatar_id":"","url":"https://api.github.com/users/bestofmukul","html_url":"https://github.com/bestofmukul","followers_url":"https://api.github.com/users/bestofmukul/followers","following_url":"https://api.github.com/users/bestofmukul/following{/other_user}","gists_url":"https://api.github.com/users/bestofmukul/gists{/gist_id}","starred_url":"https://api.github.com/users/bestofmukul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestofmukul/subscriptions","organizations_url":"https://api.github.com/users/bestofmukul/orgs","repos_url":"https://api.github.com/users/bestofmukul/repos","events_url":"https://api.github.com/users/bestofmukul/events{/privacy}","received_events_url":"https://api.github.com/users/bestofmukul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-03T23:01:53Z","updated_at":"2016-05-04T00:54:22Z","closed_at":null,"body":"I have a method that fetches value from etcd and returns the default value if it does not exist. I am relying on error: ErrorCodeKeyNotFound for this functionality. Golang client is returning me an empty node struct for a non-existing path(e.g. /random-string).\r\n\r\nAlthough etcdctl is returning the correct response:  Error: 100: Key not found"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/216712276","html_url":"https://github.com/coreos/etcd/issues/5264#issuecomment-216712276","issue_url":"https://api.github.com/repos/coreos/etcd/issues/5264","id":216712276,"user":{"login":"bestofmukul","id":1292909,"avatar_url":"https://avatars.githubusercontent.com/u/1292909?v=3","gravatar_id":"","url":"https://api.github.com/users/bestofmukul","html_url":"https://github.com/bestofmukul","followers_url":"https://api.github.com/users/bestofmukul/followers","following_url":"https://api.github.com/users/bestofmukul/following{/other_user}","gists_url":"https://api.github.com/users/bestofmukul/gists{/gist_id}","starred_url":"https://api.github.com/users/bestofmukul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestofmukul/subscriptions","organizations_url":"https://api.github.com/users/bestofmukul/orgs","repos_url":"https://api.github.com/users/bestofmukul/repos","events_url":"https://api.github.com/users/bestofmukul/events{/privacy}","received_events_url":"https://api.github.com/users/bestofmukul/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T00:54:22Z","updated_at":"2016-05-04T00:54:22Z","body":"This is how my test code looks like\r\n\r\n`opts := &etcdclient.GetOptions{Quorum: true}`\r\n`res, err := ec.keysAPI.Get(context.Background(), path, opts)`\r\n`if err != nil {`\r\n\t\t`return nil, err`\r\n\t`}`\r\n\r\n`return res.Node, nil`"}}