The consideration for which the plaintiff deposited with or paid the money to the defendant has entirely failed, or rather there was never any consideration ; and he is entitled to have it restored to him. The idea that the defendant can retain the money upon the void or illegal agreement between the plaintiff and his wife for procuring a judgment of divorce, and which the defendant, as their attorney, advised, is not to be tolerated. He cannot do so. The complaint states a good cause of action, and the demurrer was properly overruled.
It is objected, that, upon overruling the demurrer, the judgment should have been that the defendant answer over, and not that the plaintiff should recover, etc. This is clearly not so. The judgment as directed was correct. The practice at common law is correctly stated by Mr; Gould (Could’s PI. ch. IX, § 42), where he says: “In like manner, when a demurrer is joined on any .of the pleadings in chief — ■ as on the declaration, plea in bar, or other *690pleading which goes to the action, the judgment is i. e., if for the plaintiff, it is, quod recwperet; if for the defendant, it is, quod eat sine die : so that, on demurrer to any of the pleadings which go to the action, the judgment for either party is the same as it would have been on an issue in fact, joined upon the same pleading, and found in favor of the same party.” And the rule of the common law is the rule of the code as enacted in this state. Section 21, ch. 132, R. S., provides : “On a judgment for the plaintiff upon an issue of law, the plaintiff may proceed in the manner prescribed by the first two subdivisions of section twenty-seven of this chapter, upon the failure of the defendant to answer when the summons was personally served. If judgment be for the defendant, upon an issue of law, and if the fairing of an account or the proof of any fact be necessary to enable the court to complete the judgment, a reference or assessment by a jury may be ordered as in that section provided.” In this case the demurrer went to the action. It was to the complaint, that it did not state facts sufficient to constitute a cause of action. The proper direction, therefore, was, that the plaintiff have judgment for his damages, unless leave was given to the defendant to .answer over, which is usually done as matter of course, upon his application, provided the demurrer be not frivolous, clearly interposed in bad faith and for the purpose of delay. The judgment thus directed, which was final, must be perfected -in the manner pointed out by the statute. In a case of this kind, which is an action for relief, and not upon a contract for the recovery of money only, application must be made to the court for the relief demanded in the complaint, pursuant to the provisions of subdivision two of section twenty-seven, above referred to. And this brings us-to another objection, which seems fatal to the regularity of the judgment.
The application under that subdivision must be pre*691ceded by eight days’ notice to the defendant of the time and place, in case the defendant give notice of appearance in the action before the expiration of the time for answering. No snch notice was here given, or at least none appears by the judgment roll returned upon the appeal, where the same should be found in case it had been given. The notice, if given, would constitute a part of the judgment roE. E. S., ch. 132, § 35, subd. 2. The judgment perfected without such notice is erroneous, and must be reversed, and 'the cause remanded for further proceedings according to law.
By the Court. —It is so ordered.