I am using RxJava2 in my android project.
I am using the following code to create the Observable
public Observable<AlbumDetails> loadAlbumFromAlbumId(final String albumId) {
return Observable.fromCallable(new Callable<AlbumDetails>() {
@Override
public AlbumDetails call() throws Exception {
AlbumDetails albumDetails = getAlbumDetails(albumId);
return albumDetails;
});
}
From the observable, I am getting following error in the onError method of DisposableObserver
Callable returned null
This didn't use to happend when using RxJava.