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