a8979eb50f2e97813bbbe9282a2bdebe827d81ac
chmalee
  Tue Jan 3 15:24:14 2023 -0800
Work around 'error' message when searching. Previously, just typing in a term that we can't find is considered an error and we throw up a confusing alert message. Now we work around that specific error message and just let the search UI handle saying no results, refs #30419

diff --git src/hg/js/hgSearch.js src/hg/js/hgSearch.js
index 7472965..bd71069 100644
--- src/hg/js/hgSearch.js
+++ src/hg/js/hgSearch.js
@@ -671,31 +671,31 @@
             $("#speciesSelect").append(newOpt);
         });
     }
 
     function changeSearchResultsLabel() {
         // change the title to indicate what assembly was search:
         $("#dbPlaceholder").empty();
         $("#dbPlaceholder").append("on " + db + " (" + $("#dbSelect")[0].selectedOptions[0].label+ ")");
     }
 
     function checkJsonData(jsonData, callerName) {
         // Return true if jsonData isn't empty and doesn't contain an error;
         // otherwise complain on behalf of caller.
         if (! jsonData) {
             alert(callerName + ': empty response from server');
-        } else if (jsonData.error) {
+        } else if (jsonData.error && !jsonData.error.startsWith("Sorry, couldn't locate")) {
             console.error(jsonData.error);
             alert(callerName + ': error from server: ' + jsonData.error);
         } else {
             if (debugCartJson) {
                 console.log('from server:\n', jsonData);
             }
             return true;
         }
         return false;
     }
 
     function updateStateAndPage(jsonData, doSaveHistory) {
         // Update uiState with new values and update the page.
         _.assign(uiState, jsonData);
         db = uiState.db;