The Code of Criminal Procedure, 1973 (CrPc)
463. Non-compliance with provisions of section 164 or section 281.
(1) If any court before which a confession or other statement of an accused person recorded, or purporting to be recorded under section 164 or section 281, is tendered, or has been received, in evidence finds that any of the provisions of either of such sections have not been complied with by the Magistrate recording the statement, it may, notwithstanding anything contained in section 91 of the Indian Evidence Act, 1872 (1 of 1872), take evidence in regard to such non-compliance, and may, if satisfied that such non-compliance has not injured the accused in his defence on the merits and that he duly made the statement recorded, admit such statement.
(2) The provisions of this section apply to courts of appeal, reference and revision.