trycatch if there are no errors for a search