Whenever any person has been arrested under a warrant as provided in sections 29-401 to 29-411, it shall be the duty of the officer making the arrest to take the person so arrested before the proper magistrate; and the warrant by virtue of which the arrest was made, with the proper return endorsed thereon and signed by the officer, shall be delivered to such magistrate.