onFailure

fun <V, E : Throwable> Either<V, E>.onFailure(f: (E) -> Unit)

Calls the function f with a specific error when Either is failure.