The court, in every stage of an action, must disregard any error or defect in the proceeding which does not affect the substantial rights of the adverse party; and no judgment shall be reversed or affected by reason of such error or defect.