A person charged with this offense may not argue that a peace officer was acting illegally in the course of his or her duties. So long as the official was acting under color of his or her official authority, the offense may still be charged against an alleged offender so long as the peace officer: acted in the regular course of his or her assigned duties; made a judgment in good faith based on the surrounding facts and circumstances; and took actions to enforce the law or preserve the peace. Challenging a peace officer's illegal actions is best done in a court of law, not in the heat of the moment.