handling ajax search errors