When an appeal shall be dismissed or when judgment shall be entered in the district court against the appellant, the sureties in the undertaking shall be liable to the appellee for the amount of the judgment, interest, and costs recovered against the appellant, but not to exceed the amount of the undertaking.