API for forwarding clean-up errors returned from .return() to consumers of execute?
#4143
-
|
There are 2-6 cases in which we might want to call
In each of these scenarios, we would have to think about how to forward errors from See: #4142 for an attempt to address (only some!) of the above cases. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
@yaacovCR Correctly forwarding |
Beta Was this translation helpful? Give feedback.
@yaacovCR Correctly forwarding
.return()is essential for resource cleanup (closing DB connections, stopping subscriptions).If the upstream source supports
return, the executor should definitely call it when the downstream consumer aborts. This is standard AsyncIterator behavior in JS.If the current implementation drops it "in some cases" (like filtering), that sounds like a leak/bug that should be addressed to ensure robust stream termination.