{"action":"created","issue":{"url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/10","repository_url":"https://api.github.com/repos/kevinswiber/pipeworks","labels_url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/10/comments","events_url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/10/events","html_url":"https://github.com/kevinswiber/pipeworks/pull/10","id":179477259,"number":10,"title":"fix bug: #siphon - should pass the faultPipe","user":{"login":"osher","id":803101,"avatar_url":"https://avatars.githubusercontent.com/u/803101?v=3","gravatar_id":"","url":"https://api.github.com/users/osher","html_url":"https://github.com/osher","followers_url":"https://api.github.com/users/osher/followers","following_url":"https://api.github.com/users/osher/following{/other_user}","gists_url":"https://api.github.com/users/osher/gists{/gist_id}","starred_url":"https://api.github.com/users/osher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osher/subscriptions","organizations_url":"https://api.github.com/users/osher/orgs","repos_url":"https://api.github.com/users/osher/repos","events_url":"https://api.github.com/users/osher/events{/privacy}","received_events_url":"https://api.github.com/users/osher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-27T12:19:16Z","updated_at":"2016-10-13T10:12:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kevinswiber/pipeworks/pulls/10","html_url":"https://github.com/kevinswiber/pipeworks/pull/10","diff_url":"https://github.com/kevinswiber/pipeworks/pull/10.diff","patch_url":"https://github.com/kevinswiber/pipeworks/pull/10.patch"},"body":"When an error is thrown in any of the handlers - the flow is broken: I don't get to the last fitting, and I don't get to the fault-pipe handler.\r\nI assumed we need to pass the faultPipe handler.\r\n\r\nI created this branch online, then cloned it and went to add tests.\r\nThen I saw there are more internal parts that are ignored...\r\n\r\nIs it on purpose that it does not pass `Pipeworks#pre` and `Pipeworks#post`?\r\n\r\nWhat if the user puts his end-handler with `{affinity: sink}` ? \r\nwe'll get broken the same way...\r\n\r\nWhat if the user tries to measure exec-time using `{affinity: hoist}` ? \r\n\r\nAny comment will be appreciated...\r\n"},"comment":{"url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/comments/253472793","html_url":"https://github.com/kevinswiber/pipeworks/pull/10#issuecomment-253472793","issue_url":"https://api.github.com/repos/kevinswiber/pipeworks/issues/10","id":253472793,"user":{"login":"osher","id":803101,"avatar_url":"https://avatars.githubusercontent.com/u/803101?v=3","gravatar_id":"","url":"https://api.github.com/users/osher","html_url":"https://github.com/osher","followers_url":"https://api.github.com/users/osher/followers","following_url":"https://api.github.com/users/osher/following{/other_user}","gists_url":"https://api.github.com/users/osher/gists{/gist_id}","starred_url":"https://api.github.com/users/osher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osher/subscriptions","organizations_url":"https://api.github.com/users/osher/orgs","repos_url":"https://api.github.com/users/osher/repos","events_url":"https://api.github.com/users/osher/events{/privacy}","received_events_url":"https://api.github.com/users/osher/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T10:12:38Z","updated_at":"2016-10-13T10:12:38Z","body":"Sorry for the late respone - I was fasting. I'll be online & responsive now.\r\n\r\nAnyway - this is puzzling. \r\nI have to make sure I understand correctly.\r\n\r\nAssuming a pipe:\r\n```\r\n   pre:\r\n      - handler1\r\n   pipe:\r\n      - handler 2\r\n      - handler 3\r\n      - handler 4\r\n   post:\r\n      - handler 5\r\n   fault:\r\n      - handle_err\r\n```\r\nYou mean that if I `.sihpon(..)` it I deliberately get only `handlers 2~4`?\r\nYou mean that I mean to execute handlers 2~4 within the `pre`, `post` and `fault` of the target pipe?\r\n\r\n\r\nThis feels inconsistent with the idea expressed by the api `.fit({ affinity }, handler)`. \r\nThe way I understand this API is that this is how I get to construct my pipe, where the affinity is a tool to help me control order of execution by dividing it to general stages, where fittings can be appended dynamically to each of them.\r\n\r\nNow true, `.fault(..)` is another api - which does raises the question why in fact it's not offered as `fit({affinity:'fault'},..)` , or on the other hand why the other two affinities are not implemented using their own methods - but all in all - it looks like the tools one gets to construct the pipe.\r\n\r\nIn that sense - I would expect the `pre` and `post` handlers to pass through, as well as the error handler.\r\n\r\nAssume the example from the readme.\r\nThe one that outputs\r\n```\r\n// getting started\r\n// am i getting hijacked?\r\n// hijacked!\r\n// done-zo\r\n```\r\n\r\nNow consider that instead of `console.log('hijacked!')`, the pipe was ending with an error.\r\nAssume that the main pipe is the execution of a web-request.\r\nIn this case, the main pipe and the web-request - stay hanged, because nothing reports about the error.\r\n\r\n\r\nI could still be in lack of understanding.\r\nHere is the concrete case: I was trying to add supporting `done` callback to API implemented using pipeworks, I would appreciate your insight about it:\r\n\r\nhttps://github.com/apigee-127/bagpipes/pull/14/commits/486103544f323149ea5ac4d0f311759a615a32bc\r\n\r\n"}}
{"actor":{"display_login":"osher"}}