mapError

open fun <E2> mapError(filter: (E) -> E2): Result<V, E2>

If the result is an error, this method transforms the error to a different type.