31fb7e5a1323c38f0be614bd16bddfaa602862d5
gperez2
  Thu Nov 14 17:51:28 2024 -0800
Updating the error messages for broken hubs in sessions, refs #34611

diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 8156f5d..967af5f 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -4198,35 +4198,41 @@
  * incompatible with the returned list)
  * Returns list sorted by priority
  *	NOTE: this result is cached, do not free it !
  */
 {
 if (trackHubDatabase(db))
     return NULL;
 
 if (isHubTrack(db))
     {
     // this means the db has a hub_#_ prefix but didn't get loaded at init time
     unsigned hubId = hubIdFromTrackName(db);
     struct hubConnectStatus *status = hubFromIdNoAbort(hubId);
 
     if (status == NULL)
-        errAbort("Cannot set database to %s.  Hub with id %d is not found in hubStatus.\n",hubConnectSkipHubPrefix(db), hubId);
+        errAbort("Error: The database in the hub (%s) that is saved in your session is no longer accessible."
+                 " This may be due because the hub ID (%d) in your session cannot be transferred across"
+                 " different Genome Browser machines.\n",hubConnectSkipHubPrefix(db), hubId);
     else if (status->errorMessage)
-        errAbort("Cannot set database to %s.  Hub %s is reporting error: %s\n", hubConnectSkipHubPrefix(db), status->hubUrl, status->errorMessage);
+        errAbort("Error: The database %s in the hub %s that is saved in your session encountered an error:\n"
+                 "%s.\n"
+                 " This may be due to the hub moving to a new hosting location. We recommend contacting"
+                 " the hub authors for assistance.",hubConnectSkipHubPrefix(db), status->hubUrl, status->errorMessage); 
     else
-        errAbort("Cannot find genome %s in %s\n", hubConnectSkipHubPrefix(db), status->hubUrl);
+        errAbort("Error: The genome %s in in the hub is no longer available. Please reach out to the hub authors"
+                 " for further information: %s\n", hubConnectSkipHubPrefix(db), status->hubUrl);
     }
 
 struct trackDb *tdbList = NULL;
 
 boolean doCache = trackDbCacheOn();
 char *tdbPathString = hTrackDbPath();
 
 if (doCache)
     {
     struct slName *tableList = hTrackDbList();
 
     struct sqlConnection *conn = hAllocConn(db);
     time_t newestTime = 0;
     for(; tableList; tableList = tableList->next)
         {