{"action":"created","issue":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/1070","repository_url":"https://api.github.com/repos/NodeRedis/node_redis","labels_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/1070/labels{/name}","comments_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/1070/comments","events_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/1070/events","html_url":"https://github.com/NodeRedis/node_redis/issues/1070","id":157343683,"number":1070,"title":"Error in redis command's callback","user":{"login":"jayesh-sapkale","id":4235596,"avatar_url":"https://avatars.githubusercontent.com/u/4235596?v=3","gravatar_id":"","url":"https://api.github.com/users/jayesh-sapkale","html_url":"https://github.com/jayesh-sapkale","followers_url":"https://api.github.com/users/jayesh-sapkale/followers","following_url":"https://api.github.com/users/jayesh-sapkale/following{/other_user}","gists_url":"https://api.github.com/users/jayesh-sapkale/gists{/gist_id}","starred_url":"https://api.github.com/users/jayesh-sapkale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayesh-sapkale/subscriptions","organizations_url":"https://api.github.com/users/jayesh-sapkale/orgs","repos_url":"https://api.github.com/users/jayesh-sapkale/repos","events_url":"https://api.github.com/users/jayesh-sapkale/events{/privacy}","received_events_url":"https://api.github.com/users/jayesh-sapkale/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NodeRedis/node_redis/labels/question","name":"question","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-28T15:27:36Z","updated_at":"2016-05-28T22:28:45Z","closed_at":"2016-05-28T17:09:15Z","body":"\r\n```javascript\r\n/*Working code */\r\n   try{\r\n       redis_client.set(\"hello\",\"hello-val\",function(err,data){\r\n\t});\r\n   }catch(err){\r\n\tconsole.log(err);\r\n   }\r\n```\r\n\r\n\r\n```javascript\r\n/*Non-Working code when error code in callback */\r\n   try{\r\n       redis_client.set(\"hello\",\"hello-val\",function(err,data){\r\n           redis_client.invalid_function(\"hello\",\"hello-val\",function(err,data){\r\n           });\r\n       });\r\n   }catch(err){\r\n\tconsole.log(err);\r\n   }\r\n```\r\n\r\nError prone redis( version: 2.6.0-2 ) chunk : \r\n```javascript\r\n\r\nfunction normal_reply (self, reply) {\r\n    var command_obj = self.command_queue.shift();\r\n    if (typeof command_obj.callback === 'function') {\r\n        if (command_obj.command !== 'exec') {\r\n            reply = self.handle_reply(reply, command_obj.command, command_obj.buffer_args);\r\n        }\r\n        command_obj.callback(null, reply); //Error prone line no handling of error\r\n    } else {\r\n        debug('No callback for reply');\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/NodeRedis/node_redis/issues/comments/222332629","html_url":"https://github.com/NodeRedis/node_redis/issues/1070#issuecomment-222332629","issue_url":"https://api.github.com/repos/NodeRedis/node_redis/issues/1070","id":222332629,"user":{"login":"jayesh-sapkale","id":4235596,"avatar_url":"https://avatars.githubusercontent.com/u/4235596?v=3","gravatar_id":"","url":"https://api.github.com/users/jayesh-sapkale","html_url":"https://github.com/jayesh-sapkale","followers_url":"https://api.github.com/users/jayesh-sapkale/followers","following_url":"https://api.github.com/users/jayesh-sapkale/following{/other_user}","gists_url":"https://api.github.com/users/jayesh-sapkale/gists{/gist_id}","starred_url":"https://api.github.com/users/jayesh-sapkale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayesh-sapkale/subscriptions","organizations_url":"https://api.github.com/users/jayesh-sapkale/orgs","repos_url":"https://api.github.com/users/jayesh-sapkale/repos","events_url":"https://api.github.com/users/jayesh-sapkale/events{/privacy}","received_events_url":"https://api.github.com/users/jayesh-sapkale/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T22:28:45Z","updated_at":"2016-05-28T22:28:45Z","body":"@BridgeAR  thanks for comment it is helpful to learning about async error handling"}}
{"actor":{"display_login":"jayesh-sapkale"}}