add error reporting in search