From 2ec199f3fbd0758ab765cdf1f296324122e2d6c5 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Tue, 25 Apr 2023 13:00:38 -0400 Subject: [PATCH] chore(notifier): Clarify makeEachIterator rejection suppression --- packages/notifier/src/subscribe.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/notifier/src/subscribe.js b/packages/notifier/src/subscribe.js index abbf991fa9d6..13f1bb92c4fe 100644 --- a/packages/notifier/src/subscribe.js +++ b/packages/notifier/src/subscribe.js @@ -114,10 +114,10 @@ const makeEachIterator = (topic, nextCellP) => { // with an eager consumer that doesn't wait for results to settle. nextCellP = reconnectAsNeeded(getSuccessor, [tailP]); - // We expect the tail to be the "cannot read past end" error at the end - // of the happy path. - // Since we are wrapping that error with eventual send, we sink the - // rejections here too to avoid invalid unhandled rejection issues later. + // Avoid unhandled rejection warnings here if the previous cell was rejected or + // there is no further request of this iterator. + // `tailP` is handled inside `reconnectAsNeeded` and `resultP` is the caller's + // concern, leaving only `publishCountP` and the new `nextCellP`. void E.when(publishCountP, sink, sink); void E.when(nextCellP, sink, sink); return resultP;