27-16-1006. Defense against order of arrest. The defendant may file an answer, under oath, putting in issue the facts stated in the affidavit for the order of arrest, which may be tried by the court unless a jury is demanded; and the plaintiff must be held to establish the facts. If the plaintiff fails to establish the facts, the order of arrest must be dismissed and the defendant may proceed upon the undertaking of the plaintiff for damages occasioned by the arrest. The defendant may apply to the court to be discharged from arrest upon the ground of the insufficiency of the papers on which the order of arrest was granted.