In case either party entered into the contract of marriage in good faith, supposing the other to be capable of contracting, and the marriage is declared a nullity, such fact shall be entered in the decree, and the court may decree such innocent party compensation as in case of dissolution of marriage.
Iowa Code § 598.32