better error message for search