error handling in search page