{"action":"created","issue":{"url":"https://api.github.com/repos/mp911de/lettuce/issues/46","labels_url":"https://api.github.com/repos/mp911de/lettuce/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/mp911de/lettuce/issues/46/comments","events_url":"https://api.github.com/repos/mp911de/lettuce/issues/46/events","html_url":"https://github.com/mp911de/lettuce/pull/46","id":59439066,"number":46,"title":"Multi fix: Futures aren't throwing on key violation","user":{"login":"taer","id":458866,"avatar_url":"https://avatars.githubusercontent.com/u/458866?v=3","gravatar_id":"","url":"https://api.github.com/users/taer","html_url":"https://github.com/taer","followers_url":"https://api.github.com/users/taer/followers","following_url":"https://api.github.com/users/taer/following{/other_user}","gists_url":"https://api.github.com/users/taer/gists{/gist_id}","starred_url":"https://api.github.com/users/taer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taer/subscriptions","organizations_url":"https://api.github.com/users/taer/orgs","repos_url":"https://api.github.com/users/taer/repos","events_url":"https://api.github.com/users/taer/events{/privacy}","received_events_url":"https://api.github.com/users/taer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-02T05:04:15Z","updated_at":"2015-03-02T06:55:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mp911de/lettuce/pulls/46","html_url":"https://github.com/mp911de/lettuce/pull/46","diff_url":"https://github.com/mp911de/lettuce/pull/46.diff","patch_url":"https://github.com/mp911de/lettuce/pull/46.patch"},"body":"Commands issued in a multi block returned futures who would not throw exceptions for key violations. I wrote a small test case following redis.io's transaction page\r\n```\r\nMULTI\r\n+OK\r\nSET a 3\r\nabc\r\n+QUEUED\r\nLPOP a\r\n+QUEUED\r\nEXEC\r\n*2\r\n+OK\r\n-ERR Operation against a key holding the wrong kind of value\r\n```\r\nThe future for the LPOP should throw an exception on get(), but it was returning null.\r\n\r\nFor now, this patch looks at the error portion of the output to ensure there was no error. We should do better, but that will require a bit more work. \r\n\r\nThe work will be in RedisStateMachine(RSM). Now, on an error in a multi block, the command is the exec(), and the output is the target. The RSM correctly delivers the error to the output handler, but it really should have the exec command know of the multi command to deliver the both the result or the error. As of now, we'll have to do a bit more to get that.\r\n\r\nI have a bit more coming, but this is in a deliverable state"},"comment":{"url":"https://api.github.com/repos/mp911de/lettuce/issues/comments/76666244","html_url":"https://github.com/mp911de/lettuce/pull/46#issuecomment-76666244","issue_url":"https://api.github.com/repos/mp911de/lettuce/issues/46","id":76666244,"user":{"login":"mp911de","id":1035015,"avatar_url":"https://avatars.githubusercontent.com/u/1035015?v=3","gravatar_id":"","url":"https://api.github.com/users/mp911de","html_url":"https://github.com/mp911de","followers_url":"https://api.github.com/users/mp911de/followers","following_url":"https://api.github.com/users/mp911de/following{/other_user}","gists_url":"https://api.github.com/users/mp911de/gists{/gist_id}","starred_url":"https://api.github.com/users/mp911de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mp911de/subscriptions","organizations_url":"https://api.github.com/users/mp911de/orgs","repos_url":"https://api.github.com/users/mp911de/repos","events_url":"https://api.github.com/users/mp911de/events{/privacy}","received_events_url":"https://api.github.com/users/mp911de/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T06:55:17Z","updated_at":"2015-03-02T06:55:17Z","body":"This change breaks the current behavior. Async lettuce does not throw exceptions when redis states something about an error. Only sync connections throw errors. I do not want to change this since users would need to change their applications. However, lettuce should provide access to error messages."}}