ubu
08/30/2018, 2:55 PMlocationRepository
.getPredictionsForQuery(query)
.onErrorReturn { emptyList() }
.flattenAsObservable { results -> results }
.flatMapSingle { result -> locationRepository.getPlaceForPrediction(result) }
.map { place -> wrapIntoExternalResult(place, query) }
.toList()
.toObservable()
Hi there. I have this complex chain of calls. flatMapSingle { result -> locationRepository.getPlaceForPrediction(result) }
might emit an exception and terminate the whole stream. When there are results A, B, C
and only locationRepository.getPlaceForPrediction(B)
throws an exception, I would like to receive A
and C
. How would I do that? Thanks.