When spec'ing the map() operator, I was originally under the impression that if the Mapper callback threw an error, we would have to signal abort on an AbortController that manipulated the source Observable's subscriber. But upon reading the spec, I realize that simply:
... is plenty. That's because when we signal error on the "outer" Subscriber, this will abort the AbortSignal associated with that "outer" subscriber's AbortSignal.... and that "outer" AbortSignal is what the source Observable's subscription's signal is derived from.
When spec'ing the
map()
operator, I was originally under the impression that if theMapper
callback threw an error, we would have to signal abort on anAbortController
that manipulated the source Observable's subscriber. But upon reading the spec, I realize that simply:... is plenty. That's because when we signal error on the "outer"
Subscriber
, this will abort theAbortSignal
associated with that "outer" subscriber's AbortSignal.... and that "outer" AbortSignal is what the source Observable's subscription's signal is derived from.Preview | Diff