mapError

inline fun <T> Result<T>.mapError(transform: (e: Throwable) -> Throwable): Result<T>

Transforms the exception wrapped in this Result, if it is an exception. Otherwise, preserves the same Result.