Deemer, J.
The return shows that plaintiff commenced action against one J. L. Leslie before a justice of the peace, claiming the sum of $25.06. Leslie filed a counterclaim, in which he alleged that plaintiff’s claim was and is collusive and without merit; that it is for services alleged to have been rendered by one Tracy, as an attorney at law, for defendant, but that said services -were without authority from defendant, were negligently performed, and were of no value; that Tracy started suit on the same claim in the district court of Olay county, Iowa, which suit is still pending, and has not been adjudicated; that this action was brought to injure, harrass, and annoy defendant; was brought in the name of plaintiff maliciously, and with intent to injure; that plaintiff has no interest in the claim but is acting without cause and maliciously, to the damage of the defendant in the sum of $90. At the time of trial, and before judgment in justice’s court, plaintiff filed a remittitur of all of his claim in excess of $22.65, and, as a result of the action, he (plaintiff) obtained judgment before the justice in the sum of $22.65 and costs. Defendant appealed to the district court, and, the case coming on for hearing before that court, plaintiff filed a motion to dismiss the appeal because the amount in controversy was less than $25, and hence the district court had no jurisdiction.
As to the counterclaim, which was for more than $25, plaintiff, as a ground of his motion to dismiss, urged that it failed to state a cause of action, in this: that it did not allege that any of defendant’s property had been attached, or that he had been arrested, or in any way specially injured; and for the further reason that it was filed in the very action which it is alleged had been maliciously insti*521tuted; that no judgment could be rendered thereon, lienee no judgment in excess of $22.65 could be entered in any court. This motion ivas submitted to the court, Hon. A. Di Bailie presiding, and was by that court overruled. Thereupon, at the request of plaintiff, a certificate of appeal was duly allowed by Judge Bailie for an appeal to this court. Thereafter,' and at the September' term of court, the plaintiff filed in said cause an amendment to said motion to dismiss said appeal on substantially the same grounds as embodied above, and because the allegations of said counterclaim were for all of said reasons incompetent, irrelevant, and immaterial; and, said amendment coming on to be heard in said district court, Hon. W. B. Quarton, presiding judge, entered an order in said cause overruling the same, to which the plaintiff at said time duly excepted.
It is contended that the district court had no jurisdiction to try the case on appeal, and that defendants were without jurisdiction, and ,acted illegally, in overruling plaintiff’s motion to dismiss the appeal. It is fundamental that a writ of certiorari is never used to correct a mere error, but only to test the jurisdiction of the tribunal and the legality of its action. If the mistake complained of was a mere matter of judgment the writ will not ordinarily lie, for the tribunal guilty thereof is not acting illegally. Section 4154 of the Code also provides that the writ should not be granted when there is another plain, speedy, and adequate remedy. Under this section it has frequently been held that the writ should not be granted where the error complained of can be fully and speedily corrected by appeal. State v. Schmidtz, 65 Iowa, 556; Ransom v. Cummins, 66 Iowa, 137; Remey v. Board, 80 Iowa, 470; Oyster v. Bank, 107 Iowa, 39.
It will be noticed that complaint is made of the rulings on the motions to dismiss the appeal. It does not appear that any other judgment or order has been entered *522by the defendants, or by the court over which they preside. Both defendants had jurisdiction to pass upon these motions, and the error, if any, was a mere mistake of judgment, which cannot be reviewed in this action. Plaintiff invoked the jurisdiction, or rather the action, of the district court over which defendants preside, asked it to pass upon his motion to dismiss, and is now complaining of the rulings denying his motion. This is all there is to the case as it is presented to us. Manifestly, the court, and the defendants as the presiding officers thereof, had the right, and it was their duty, to pass upon those motions to dismiss; and, if they erred, it was an error of judgment, from which an appeal may be taken in a proper case. But they were not without jurisdiction, nor were they acting illegally in overruling the motions. Concede that their actions were erroneous, it does not follow that they were acting illegally, for as pointed out in the case first cited, if the mistake is one of judgment merely, about a matter on which defendants had a right to pass, their actions were not illegal. Had defendants, after overruling the motion, proceeded to judgment, and defeated the plaintiff, or rendered judgment on Leslie’s counterclaim, then the question of jurisdiction or illegal action might have arisen. But nothing of the kind appears in this record. This distinguishes the case at bar from Bardes v. Hutchinson, 113 Iowa, 610, and other like cases.
Moreover, plaintiff had another remedy at law. Judge Bailie gave a certificate of appeal, as provided by law, and plaintiff had an adequate and speedy remedy whereby to correct the error. Instead of doing that, he chose to submit the matter to the other judge of the district court in that district, who also overruled his motion. The motion, as presented to Judge Quarton, was based on the identical grounds of the motion presented to Judge Bailie, and perhaps was overruled out of courtesy to Judge Bailie. But, however this may be, it is evident that, instead of *523appealing to this court from the ruling of Judge Bailie, plaintiff preferred to submit the matter to Judge Quarton, evidently in the belief that he could, obtain a more favorable ruling from him. It does not appear that Judge Quarton refused plaintiff a certificate for appeal, or that one was asked from him. At any rate, there was nothing to prevent an appeal from the ruling of Judge Bailie, and such an appeal would present every question in the case, and every point made before Judge Quarton. It may be that plaintiff waived his right of appeal by amending his motion and presenting the matter to Judge Quarton, but, if that be so, he did it knowingly and intentionally, and lie makes no showing in excuse of his failure to appeal from Judge Quarton’s ruling. When it is once conceded— as it must be — that defendants, as judges, had the right to pass upon plaintiff’s motion, the case is determined; for it follows that they had jurisdiction, and did not act “illegally,” as that term is used in law. This is made plain by the authorities heretofore cited. See, also, Davis Co. v. Horn, 4 G. Greene, 94, and particularly Fagg v. Parker, 11 Iowa, 18, where it is said: “It is no part of the ofiice of the writ of certiorari to correct every alleged error of judgment in judicial tribunals which parties claim take them by surprise. Nor, again, does this writ issue to correct an error, where the party has lost the plain, speedy, and adequate remedy pointed out by law by his own fault and negligence. When the statute says that this writ may issue for certain purposes, when, in the judgment of the court applied to, there is no other plain, speedy, and adequate remedy, it was not intended to aid a party who had such a remedy, but has lost it by his own laches, — by his own failure to attend to his proper duty.”
In Sudberg v. District Court, Linn County, 61 Iowa, 597, it is said: “The order in the district court transferring the cause to the United States court was within its jurisdiction. While the order may have been erroneously *524made, - it cannot be claimed that the court exceeded its jurisdiction. The petition does not show that the court acted illegally; that -is, that its proceedings were not in ac- . cord with law in transferring the case. The real ground of complaint is that the court erred in substituting new defendants in the action. If they had been regularly and lawfully substituted, there would have been no irregularity or error in transferring the case. The order to that , effect cannot, therefore, be reviewed upon certiorari, for the court in making it did not exceed its proper jurisdiction, or otherwise act illegally.” The only case relied upon by plaintiff’s counsel is Schultz v. Holbrook, 86 Iowa, 570. But it does not touch the point now under consideration. C. & N. W. Railroad Co v. Weaver, 112 Iowa, 101, is more in point, but in that case the question we are now considering was not discussed. Moreover, the appeal was dismissed, and the case was, in effect, determined by the district court. • Again, there was no certificate of appeal in that case. See, also, as sustaining our conclusions, In re Hayward, 10 Pick. 358; Railroad Co. v. Whipple, 22 Ill. 105; Stuttmeister v. Superior Court, 71 Cal. 324, 12 Pac. Rep. 270; Palms v. Campau, 11 Mich. 109; Macrum v. Jones (Pa.) 11 Atl. Rep. 317.
' The writ must be dismissed.