1.x: Add missing error handler call in Completable#3938
1.x: Add missing error handler call in Completable#3938bryant1410 wants to merge 1 commit intoReactiveX:1.xfrom
Conversation
|
Why do you think it's missing? In operators, only undeliverable exceptions are supposed to be sent to the global handler. |
|
I'm not pretty sure if this call to the handler goes there. But it arises from using the Retrofit's RxJava adapter, and realizing that Completable's endpoints errors are not caught by an error handler, while Observable's and Single's are. |
|
Interesting, could be that Completable doesn't use SafeSubscriber, which is responsible to deliver some errors thrown by onXXX methods. To be sure, could you add a unit test that demonstrates how Single gets your exception and how Completable isn't? |
|
Okey |
|
I think this comment is related: Completable.java#L1968. From what I see, The call to the handler is missing from |
|
Completable was designed with a modern mindset where end-CompletableSubscribers are not expected to throw from the onXXX methods, but apparently, there was no safeSubscribe() added to the API. The current 1.x convention is to have subscribe() do additional safeguards and have an unsafeSubscribe() as direct as possible. |
|
See #3942 for other forms of handling errors. |
|
Closing via #3942 |
No description provided.