{"action":"created","issue":{"url":"https://api.github.com/repos/paldepind/flyd/issues/35","labels_url":"https://api.github.com/repos/paldepind/flyd/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/paldepind/flyd/issues/35/comments","events_url":"https://api.github.com/repos/paldepind/flyd/issues/35/events","html_url":"https://github.com/paldepind/flyd/issues/35","id":86821089,"number":35,"title":"Handle Error cases","user":{"login":"ybybzj","id":163048,"avatar_url":"https://avatars.githubusercontent.com/u/163048?v=3","gravatar_id":"","url":"https://api.github.com/users/ybybzj","html_url":"https://github.com/ybybzj","followers_url":"https://api.github.com/users/ybybzj/followers","following_url":"https://api.github.com/users/ybybzj/following{/other_user}","gists_url":"https://api.github.com/users/ybybzj/gists{/gist_id}","starred_url":"https://api.github.com/users/ybybzj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ybybzj/subscriptions","organizations_url":"https://api.github.com/users/ybybzj/orgs","repos_url":"https://api.github.com/users/ybybzj/repos","events_url":"https://api.github.com/users/ybybzj/events{/privacy}","received_events_url":"https://api.github.com/users/ybybzj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-10T03:32:36Z","updated_at":"2015-06-10T12:19:35Z","closed_at":null,"body":"Any thoughts on how to handle errors in a stream? For example, if a promise is rejected, from what i saw in code the stream will never be triggered, since the promise only invoke like this `n.then(s) //line 134  `.\r\n\r\nI try to improve this, but have not come up a rational solution. Should stream just end itself when it encounters an error, or should it provide a way to be listened to its errors?  "},"comment":{"url":"https://api.github.com/repos/paldepind/flyd/issues/comments/110727449","html_url":"https://github.com/paldepind/flyd/issues/35#issuecomment-110727449","issue_url":"https://api.github.com/repos/paldepind/flyd/issues/35","id":110727449,"user":{"login":"ybybzj","id":163048,"avatar_url":"https://avatars.githubusercontent.com/u/163048?v=3","gravatar_id":"","url":"https://api.github.com/users/ybybzj","html_url":"https://github.com/ybybzj","followers_url":"https://api.github.com/users/ybybzj/followers","following_url":"https://api.github.com/users/ybybzj/following{/other_user}","gists_url":"https://api.github.com/users/ybybzj/gists{/gist_id}","starred_url":"https://api.github.com/users/ybybzj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ybybzj/subscriptions","organizations_url":"https://api.github.com/users/ybybzj/orgs","repos_url":"https://api.github.com/users/ybybzj/repos","events_url":"https://api.github.com/users/ybybzj/events{/privacy}","received_events_url":"https://api.github.com/users/ybybzj/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T12:19:35Z","updated_at":"2015-06-10T12:19:35Z","body":"Yeah, something like this. Thanks for your reply! \r\nAnd, users can easily forget to handle errors, maybe try-catch the synchronous code too? \r\n"}}