Emit searchEnded if theres an error