A mistake of law occurs only where a person has an honest but mistaken belief in the legality of his or her actions. Although it is not a defence to a criminal charge, mistake of law can nevertheless be used as a mitigating factor in sentencing.
Offenders who honestly but mistakenly believe in the lawfulness of their actions are less morally blameworthy than offenders who — in committing the same offence — are unsure about the lawfulness of their actions or know that their actions are unlawful.
R. v. Suter,  2 SCR 496, 2018 SCC 34 (CanLII), at para. 64
An accused who raises mistake of law as a mitigating factor on sentence has the onus of establishing, on a balance of probability, that the requisite elements of a mistake of law have been made out.
Supra, at para. 68.
Stuart O’Connell, O’Connell Law Group (All rights reserved to author).
[FN] Confusion or uncertainty as to the lawfulness of one’s actions –while not meeting the legal requirements for mistake of law — may still be relevant to the sentencing analysis depending on the facts of the particular case. Its mitigating effect, if any, will necessarily be less than in a situation where there is a true mistake of law: Supra, at para 65.