I'm using Retrofit2 and RxJava2CallAdapter and I have an issue making the difference between a request canceled by the client side and another one canceled by the server side.
If my user leave the current screen where a request has been started, the request is canceled which is the expected behavior.
But, sometimes I get :
HTTP FAILED: java.io.IOException: Canceled
or
HTTP FAILED: java.net.SocketException: Socket closed
if the server cancel the request (really rare and hard to reproduce), but those errors are not transmit to the DisposableObserver. If I look in the code of CallExecuteObservable, I can see that if the request is canceled, nothing is triggered in the DisposableObserver (neither onError(), neither onComplete()).
So my question is: Is it possible to make a difference and/or to handle this case ? Thanks in advance.