The action was brought to foreclose a mechanic’s lien. The complaint was dismissed without costs) . Both parties appeal; the plaintiff from so much of the judgment as dismissed the complaint, and the defendant from so much as refused costs to her. The plaintiffs contracted to put up a building for the defendant’s testator at a certain price, to be paid in installments. It was provided in the contract that.a certificate should be obtained from and signed by the architect before an installment should become payable. The action was brought to recover the last installment. The *593plaintiff alleged full performance of the contract. That was denied by the defendant. There was a serious conflict of evidence as to whether the certificate had been procured from the architect entitling the plaintiff to recover the last installment, the plaintiff insisting ’and giving evidence that' the certificate had been given, and the architect testifying that he did not think he gave a certificate and that it had never been asked for. Upon that evidence the referee found for the defendant and dismissed the complaint.
The plaintiff was bound to produce the certificate before he was éntitled to his payment, and that certificate was a condition, precedent to his right to be paid in full. Until he procured it he was not entitled to recover. (Weeks v. O'Brien, 141 N. Y. 199.)
The finding of the referee was sustained by the evidence ; therefore, his dismissal of the complaint was correct, but the failure to obtain a certificate did not take away permanently the right of the plaintiff to be paid whatever was due to him upon the contract. When that certificate shall have been obtained the defect in his cause of action will be supplied. The determination of the referee was not, therefore, an adjudication that the plaintiff could never recover, but was simply a-determination .that the bringing of the action had been premature, and amounted in effect to a nonsuit. The complaint should not, therefore, have been dismissed absolutely, and the judgment should be modified to read that the complaint was dismissed, but “ not upon the merits.” The question of costs was within the discretion of the referee, and upon the whole case we see no reason for interfering with the manner in which he exercised it. The defendant’s appeal should, therefore, fail.
The judgment should he modified by inserting after the word “ dismissed,” the words “ but not upon the merits,” and as so modified be affirmed, with costs to the defendant respondent.
Van Brunt, P. J., Barrett and Ingraham, JJ., concurred; O’Brien, J., dissented.