mapErr

inline fun <T> <Error class: unknown class><T>.mapErr(onFailure: (Throwable) -> Throwable): <Error class: unknown class><T>

Maps the exception to a new error if this instance represents Result.isFailure, leaving a Result.isSuccess value untouched.