Horayot 8 - How Serious Does the Error Have to Be?
The court brings the "sin of forgetfulness" sacrifice only if the action they had permitted requires a sin offering if done unintentionally and leads to excision if done willfully. This is known by comparison to the law of one's wife's sister, which the Torah spells out. In both places the same word "because of her" is used and thus their laws are the same. This rule is also true for an anointed priest, about whom the Torah says "for the people to be ashamed of him" - which means that he has the same law as the people. This rule is also true for a leader of the nation.
The court does not bring a bull sacrifice if they rule incorrectly about a purity aspect of the Temple service, since an individual brings a different sin offering for that. Rather, it should be an error leading to a regular sin-offering, for example, the positive commandment of husband and wife to abstain before the day of expected menses, and a negative commandment not to have relations with the wife who has not been to the mikvah.
Art: Pierre Auguste Renoir - Two Sisters II