Catch errors while searching.