Skip to content

Instantly share code, notes, and snippets.

@cloudshooterhuman
Created February 1, 2017 22:33
Show Gist options
  • Save cloudshooterhuman/ac089338abb435b148b8995bd7023557 to your computer and use it in GitHub Desktop.
Save cloudshooterhuman/ac089338abb435b148b8995bd7023557 to your computer and use it in GitHub Desktop.
onError
@Override
public void onError(Throwable e) {
getMvpView().hideProgressIndicator();
if (e instanceof IOException || e instanceof HttpException) {
mDataManager.getProfiles().subscribe(new Action1<List<Profile>>() {
@Override
public void call(List<Profile> profiles) {
renderProfilesUi(profiles);
}
});
} else {
getMvpView().showError();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment