getError

fun <V, E> Result<V, E>.getError(): E?

Returns the error if this Result is Err, otherwise null.