Пример #1
0
 <T> Observable<T> errorWhenLoggedIn(Throwable throwable) {
   if (throwable instanceof AuthException) {
     return userDataSource.getCurrentUser().flatMap(user -> Observable.error(throwable));
   } else {
     return Observable.error(throwable);
   }
 }