I\'m using rxjs 5.5.6.
I\'ve created this code in order to show the behavior:
Observable.of(1, 2)
.do(a => {
console.log(a);
let d
You get the output
1
error catched
because the first value throws an error in tap
which is propagated through the onError
channel which halts the sequence. With catch
you catch this error and move on to the next sequence (never
), but the first sequence (of(1,2)
) is still halted. So after 1
throws an error 2
is never processed by tap
.
After you return never
in catch
no value is emitted and the Observable never completes. If you add logs inside subscribe
for the next
, error
and complete
callbacks you will see that they are never executed.