How to resume flow after exception
You should catch exception of fetchSomeData(), so move catch
from main flow to fetchSomeData():
scope.launch {
channel.asFlow().
.flatMapLatest { fetchSomeData().catch { emit(DefaultData()} }
.onEach { handleData() }
.collect()
}