viewer.geocoder.viewModel.search().How to judge a triggered search method?

My code:
    viewer.geocoder.viewModel.searchText = this.srarchText;
    viewer.geocoder.viewModel.search();

    proble:
    
    srarchText this value is entered by the user form. Sometimes the user enters information that cannot find the address. But I don't know how to get a value to make sure that the user cannot find the address?

viewer.geocoder.viewModel.search is a Command object. The Command object has a property afterExecute event you can subscribe to and check the event for the results.

You could also check the list of suggestions before performing the search.

Thanks!

Gabby