Yeah, well, even the Law of Obligations says basically the same thing, though you’ve gotta look at section 410 😉
Basically, here is what the buyer is entitled to
Section 410.
(1) If a buyer gives the seller a heads-up about a defect in a timely and proper way, they get to pick how to handle it:
1) ask the seller to just fix the damn thing,
2)
demand that the seller swaps it out for a working one instead,
3) ask for a discount on the price,
4) just call it quits and cancel the contract altogether.
(2) No matter which route you take, you're also entitled to compensation for damages under the standard rules regarding
liability for damages, which covers any collateral damage caused to your other
property because of the faulty item.
(3) Now, if the defect is just something minor, you can't really bail on the whole contract, but you still have
other rights regarding material defects, including getting compensated for
damages...
(4) And yeah, the seller is the one footing the bill for fixing the issue or swapping out the item for a good one.