{"action":"created","issue":{"url":"https://api.github.com/repos/jdonaldson/promhx/issues/50","labels_url":"https://api.github.com/repos/jdonaldson/promhx/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/jdonaldson/promhx/issues/50/comments","events_url":"https://api.github.com/repos/jdonaldson/promhx/issues/50/events","html_url":"https://github.com/jdonaldson/promhx/issues/50","id":59755598,"number":50,"title":"Rejected promise and errorPipe/errorThen","user":{"login":"mcheshkov","id":1045163,"avatar_url":"https://avatars.githubusercontent.com/u/1045163?v=3","gravatar_id":"","url":"https://api.github.com/users/mcheshkov","html_url":"https://github.com/mcheshkov","followers_url":"https://api.github.com/users/mcheshkov/followers","following_url":"https://api.github.com/users/mcheshkov/following{/other_user}","gists_url":"https://api.github.com/users/mcheshkov/gists{/gist_id}","starred_url":"https://api.github.com/users/mcheshkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcheshkov/subscriptions","organizations_url":"https://api.github.com/users/mcheshkov/orgs","repos_url":"https://api.github.com/users/mcheshkov/repos","events_url":"https://api.github.com/users/mcheshkov/events{/privacy}","received_events_url":"https://api.github.com/users/mcheshkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-04T06:24:21Z","updated_at":"2015-03-04T07:26:40Z","closed_at":null,"body":"This is similar to #44 \r\n\r\n    var p = new Promise<Int>();\r\n    p.reject(2);\r\n    p.then(function(a){\r\n        return true;\r\n    }).errorPipe(function(e){\r\n        return Promise.promise(false);\r\n    });\r\n\r\nI expect result to be Promise<Bool> with true for no errors, and false for error. I use that in tests.\r\nBut now it ends up in unhandled exception from `update_errors`. And if I call reject after errorPipe everything is as expected. \r\n\r\nIn `errorPipe` there's `then(ret._resolve);` and it ends up `immediateLinkUpdate`, `isErrored` branch.\r\n`handleError` will check `_error.length > 0` before calling `next.handleError`, `immediateLinkUpdate` wont.\r\n\r\nSimilar thing with errorThen."},"comment":{"url":"https://api.github.com/repos/jdonaldson/promhx/issues/comments/77108617","html_url":"https://github.com/jdonaldson/promhx/issues/50#issuecomment-77108617","issue_url":"https://api.github.com/repos/jdonaldson/promhx/issues/50","id":77108617,"user":{"login":"jdonaldson","id":41479,"avatar_url":"https://avatars.githubusercontent.com/u/41479?v=3","gravatar_id":"","url":"https://api.github.com/users/jdonaldson","html_url":"https://github.com/jdonaldson","followers_url":"https://api.github.com/users/jdonaldson/followers","following_url":"https://api.github.com/users/jdonaldson/following{/other_user}","gists_url":"https://api.github.com/users/jdonaldson/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaldson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaldson/subscriptions","organizations_url":"https://api.github.com/users/jdonaldson/orgs","repos_url":"https://api.github.com/users/jdonaldson/repos","events_url":"https://api.github.com/users/jdonaldson/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaldson/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T07:26:40Z","updated_at":"2015-03-04T07:26:40Z","body":"Thanks for these, I'll give more of a substantial update soon."}}