Section 151(2) in Bharatiya Nagarik Suraksha Sanhita, 2023
(2)(a) No Executive Magistrate or police officer acting under any of the said sections in good faith;(b) no person doing any act in good faith in compliance with a requisition under section 148 or section 149;(c) no officer of the armed forces acting under section 150 in good faith;(d) no member of the armed forces doing any act in obedience to any order which he was bound to obey, shall be deemed to have thereby committed an offence.