Skip to content

safe flow

milan jurkulák edited this page May 2, 2024 · 1 revision

//tvlib/org.mjdev.tvlib.extensions/ApiResponseExt/safeFlow

safeFlow

[androidJvm]
fun <T> ApiResponse<T>.safeFlow(error: (Exception) -> Unit = { exception -> Timber.e(exception) }, onError: (error: ApiResponse.Failure.Error) -> Unit = { e -> error(CodeException(e.message())) }): Flow<T>

Clone this wiki locally