Handle search errors in html