Mistake of Fact Defense:
Can be a defense to a crime. For example, let’s say you had an identical purse as someone, and you put it down next to theirs. You come back, and accidentally grab theirs and go home. You are then charged with theft. You never intended to steal anything, this was just a mistake of fact. You picked up the purse that was the same color, brand, etc. It is reasonable to use that as a defense.
Mistake of Law
A mistake of law is completely different. A mistake of law is typically not a defense in the majority of jurisdictions across the nation. A mistake of law is basically someone trying to say, “I was not aware of a law that I violated. I did not know about the law.” That is not a good defense. Typically laws are made public and there’s an implication that everybody knows what the law is.