-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Async, Error Handling
-
None
Ensure exceptions calling onError|onComplete log if the Publisher already considers itself terminal.
In the scenario where onComplete errors, then onError won't be called as the Publisher has marked itself as terminated. The error should be logged to help debugging.
Was:
I'm using the "mongodb-driver-reactivestreams" driver versionĀ 1.11.0.
An exception is thrown in our code which propagates all the way to "AbstractSubscription.tryProcessResultsQueue" on line 161 where "onError" is called but in it the "terminalAction()" check returns "false" so "observer.onError(t)" is not called. Actually neither is "observer.onComplete()".
This is definitely a bug, at least one of the two should be called and, of course, in this case "onError" should be.
If it is not obvious to you what's going on, I could try creating a reproduction but this will take a while.