Horayos 2:5-6
Horayos 2:5
The court is not liable to bring an offering for mistaken rulings involving an oath of testimony, a person who accepted an oath upon himself, or matters of ritual impurity vis-à-vis the Temple and its holy things. The same is true of the king, according to Rabbi Yosi HaGlili. Rabbi Akiva said that the king would be liable to bring an offering in all of these cases except for the oath of testimony because the king cannot judge, be judged, testify, or be testified against.
Horayos 2:6
For any mitzvah in the Torah that carries the penalty of kareis (spiritual excision) if committed intentionally and a sin offering if committed unintentionally, one must offer a sheep or a goat, the king offers a male goat, and the Kohein Gadol and the court offer a bull. In cases of idolatry, a private individual, the king and the Kohein Gadol offer a female goat, and the court offers a bull and a male goat, the former as a burnt offering and the latter as a sin offering.