{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-golang/issues/97","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-golang/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-golang/issues/97/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-golang/issues/97/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-golang/issues/97","id":53553815,"number":97,"title":"datastore: Get (and GetMulti) return a nil error instead of ErrNoSuchEntity","user":{"login":"ivanpi-mtv","id":9544870,"avatar_url":"https://avatars.githubusercontent.com/u/9544870?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanpi-mtv","html_url":"https://github.com/ivanpi-mtv","followers_url":"https://api.github.com/users/ivanpi-mtv/followers","following_url":"https://api.github.com/users/ivanpi-mtv/following{/other_user}","gists_url":"https://api.github.com/users/ivanpi-mtv/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanpi-mtv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanpi-mtv/subscriptions","organizations_url":"https://api.github.com/users/ivanpi-mtv/orgs","repos_url":"https://api.github.com/users/ivanpi-mtv/repos","events_url":"https://api.github.com/users/ivanpi-mtv/events{/privacy}","received_events_url":"https://api.github.com/users/ivanpi-mtv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-06T19:39:26Z","updated_at":"2015-01-09T00:06:07Z","closed_at":"2015-01-09T00:06:07Z","body":"When a Get call is issued for an entity that doesn't exist, it returns a nil error, even though the documentation states it should return ErrNoSuchEntity.\r\n\r\nThe underlying problem seems to be in the last for...range in GetMulti. It examines only the Found field in LookupResponse, but the keys with no matching entities are in Missing instead.\r\nIt also doesn't use the key-to-index mapping (already set up above) when accessing the multiErr array, but assumes that keys in the response are in the same order.\r\nIt should iterate through Missing and copy keys and errors from there, as well as through Deferred and return errors for those keys (according to https://github.com/GoogleCloudPlatform/gcloud-golang/issues/76 which implies that an error should be returned in the current implementation, and a retry added in the future)."}}