The rule: When
(1) one party enters a contract under a mistaken assumption that is (2) basic to the contract, (3) the contract is voidable by the party adversely affected by the mistake, if: (4) that party ought not to bear risk of the mistake, and: (5) it would be "unconscionable" to enforce the contract; or, the other party had reason to know of the mistake, or the mistake was the other party's fault.
See Restatement (Second) Contracts § 153.
Components (1) - (4) are essentially the conditions for voidability based on mutual mistake. See Restatement (Second) Contracts § 152. (5) is the additional requirement for voidability based on unilateral mistake.