“The mistake of a defendant, plaintiff or third party forms a defense in a number of circumstances, including a direct defense to an action on a contract, and a basis for avoidance through rescission, reformation, or similar remedy. ‘Mistake is the foundation of one of the chief branches of equity jurisprudence, and the exercise of equity jurisdiction is frequently had where a contract as written does not express the terms of the actual agreement between the parties.’ A person’s apparent consent to a contract, transaction, relationship or conduct is not real or free when it is given or obtained through a mistake. The mistake must be a significant and material one, since consent is deemed to have been obtained through mistake only when the party’s consent would have been refused if the mistake had not existed. A mistake sufficient to form an affirmative civil defense may be either of fact or of law or both. ‘A mistake of fact is where a person understands the facts to be other than they are; whereas a mistake of law is where a person knows the facts as they really are but has a mistaken belief as to the legal consequences of those facts.’
A person cannot be specifically compelled to perform a contract if consent to the contract was given “under the influence of mistake, misapprehension, or surprise.” A contract that fails to express the intent of the parties through mutual mistake, or the mistake of one party that the other knew or suspected, may be reformed to express the parties’ true intent if the rights of third parties acquired in good faith and for value are not prejudiced. Section 1640 of the Civil Code provides: “When, through fraud, mistake, or accident, a written contract fails to express the real intention of the parties, such intention is to be regarded, and the erroneous parts of the writing disregarded.” One who gains a thing by mistake is an involuntary trustee of the thing for the person who would otherwise have had it.
A mistake of law or fact satisfying the requirements of the law will form the basis for an affirmative action for rescission or will provide a defense to an action brought by the other party to the transaction. A mistake in judgment, not coupled with a mistake of fact or law, is not a basis for avoiding a contract or transaction. Thus, by their nature, not all mistakes are remediable or suitable to form the basis for an affirmative defense. Those persons who have acquired what they wished and sought to acquire cannot rely on the doctrine of mistake even if what they acquired turned out not to be so valuable as they had assumed. Mistakes as to the occurrence of future events are generally not the type of mistakes that will warrant relief. Any other result would permit the one who gambled and lost to roll the dice again.”
[California Affirmative Defenses [certain citations omitted]]