506. If any Magistrate not empowered by law to do any of the following things, namely:-
(a) to issue a search-warrant under section 97;
(b) to order, under section 174, the police to investigate an offence;
(c) to hold an inquest under section 196;
(d) to issue process under section 207, for the apprehension of a person within his local jurisdiction who has committed an offence outside the limits of such jurisdiction;
(e) to take cognizance of an offence under clause (a) or clause (b) of sub-section (1) of section 210;
(f) to make over a case under sub-section (2) of section 212;
(g) to tender a pardon under section 343;
(h) to recall a case and try it himself under section 450; or
(i) to sell property under section
504 or section 505, erroneously in good faith does that thing, his
proceedings shall not be set aside merely on the ground of his not being so
empowered.
Bharatiya Nagarik Suraksha Sanhita, 2023
Section 501 Destruction of libellous and other matter
Section 502 Power to restore possession of immovable property
Section 503 Procedure by police upon seizure of property
Section 504 Procedure where no claimant appears within six months
Section 505 Power to sell perishable property
Section 506 Irregularities which do not vitiate proceedings
Section 507 Irregularities which vitiate proceedings
Section 508 Proceedings in wrong place
Section 509 Noncompliance with provisions of section 183 or section 316
Section 510 Effect of omission to frame, or absence of, or error in, charge