Privilege from arrest of officers of courts of record

N.Y. Civil Rights Law § 24, under Privilege From Arrest.

N.Y. Civil Rights Law § 24

§ 24. Privilege from arrest of officers of courts of record. An officer of a court of record, appointed or elected pursuant to law, is privileged from arrest, during the actual sitting, which he is required to attend, of a term of the court of which he is an officer, and no longer; but an attorney or counselor is not thus privileged, unless he is employed in a cause, to be heard at that term.