mapResultCatching

fun <T, R> Flow<Result<T>>.mapResultCatching(transform: suspend (T) -> R): Flow<Result<R>>(source)

Maps a Flow of Results to a Flow of a mapped Results.

Any exception thrown by the transform function is caught, and emitted as a failure result to the resulting flow.

See also