Christian S.
09/18/2020, 7:16 PMgildor
09/20/2020, 3:25 PMChristian S.
09/21/2020, 8:49 AMgildor
09/21/2020, 8:51 AMgildor
09/21/2020, 8:52 AM.flatMapLatest { fetchSomeData().catch { //any default }
.onEach { handleData() }
.collect()
Christian S.
09/21/2020, 8:54 AMflow {
val result = try {
// call some REST API and return the result
} catch (e: Exception) {
// return some default/error value
}
emit(result)
}
So simple that I felt stupid asking the initial question.gildor
09/21/2020, 9:06 AM