Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign uppipeline error logic #23
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks, this is a bug. I've confirmed this, added a test, and fixed it in event-stream@3.0.6 The problem was the duplexer (which pipeline is based on) already reemits the first and last error, |
dominictarr
closed this
Sep 30, 2012
This comment has been minimized.
This comment has been minimized.
mnichols
commented
Oct 1, 2012
|
Thanks Dominic. Mike On Sun, Sep 30, 2012 at 5:42 PM, Dominic Tarr notifications@github.comwrote:
|
mnichols commentedSep 30, 2012
The docs clearly say that using 'pipeline' will emit errors from all the streams in the pipeline. In addition, though, the error is emitted for the 'pipeline' being created which means the error is re-emitted by the main pipeline. So this test indicates every error is duplicated.:
My question is why the 'pipeline' isn't considered to be more transparent? Duplicating errors causes issues on handlers since error handling code will inevitably be fired at least twice for each error and is IMO counterintuitive since the error handler now has to be ensure to only fire once (yes, I could use 'once'). Am I misunderstanding the use of this or is this issue valid?