Hi! I discovered merge2 off of the recommendation of another project... and I generally like the simplicity of merge2's stream composition API, but I got bit quite severely when I found that errors are not propagated.
Right now, I have to wrap all my usages of merge2, to listen to errors on source streams and then re-emit them on the merged stream as a workaround.
IMHO - there are probably a few classic error propagation strategies to offer when using merged streams:
Eager errors - emit error event as soon as source stream emits one. This should probably be the default, and matches the asynchronous behaviour for Promise.all(...) and Promise.race(...) (the aggregate operation errors as soon as the first source operation errors).
Deferred errors - bottle up errors until all streams have either ended or error'd. Option to aggregate errors / expose the full list of errors.
Hi! I discovered merge2 off of the recommendation of another project... and I generally like the simplicity of merge2's stream composition API, but I got bit quite severely when I found that errors are not propagated.
Right now, I have to wrap all my usages of merge2, to listen to errors on source streams and then re-emit them on the merged stream as a workaround.
IMHO - there are probably a few classic error propagation strategies to offer when using merged streams: