Hi!
Nikita Kraev
33

Yeah, looks good. But I think RxJava also fines in this case, something like this:

if (response.getCode() == 403) {
subscriber.onError(new Exception(…));
} else {
subscriber.onNext(respone);
}

observable.subscribe(new Action1<Respone>() {
@Override public void call(Respone respone) {
// do stuff here
}
}, new Action1<Throwable>() {
@Override public void call(Throwable throwable) {
// show error
}
});