f0cd10388499d445c52a3642a4b9111c5f403b7d
max
Mon Mar 30 15:17:28 2026 -0700
improving error message when db was not found, refs #37305
diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 9b48f969e07..6f25457f08f 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -1463,31 +1463,35 @@
char *db = cartOptionalString(cart,"db");
if ((db == NULL) || startsWith("hub_", db) || sameString("0", db))
return;
else
{
char *url = genarkUrl(db);
if (url != NULL)
{
cartSetString(cart, "genome", db);
cartAddString(cart, "hubUrl", url);
cartRemove(cart, "db");
}
else if (!hDbIsActive(db))
- errAbort("Can not find database '%s'", db);
+ errAbort("Can not find database '%s'.
"
+ "You can search for the genome %s in "
+ "the list of NCBI/INSDC assemblies, then click 'request' when you have found the right assembly "
+ "and enter your email address. We will then make a genome browser and get back to you within a few days",
+ db, db, db);
}
}
boolean isValidToken(char *token)
/* send https req to cloudflare, check if the token that we got from the captcha is really the one made by cloudflare */
{
char *url = "https://challenges.cloudflare.com/turnstile/v0/siteverify";
char *secret = cfgVal("cloudFlareSecretKey");
if (!secret)
errAbort("'cloudFlareSecretKey' must be set in hg.conf if cloudflare is activated in hg.conf");
char data[3000]; // cloudflare token is at most 2000 bytes
safef(data, sizeof(data), "secret=%s&response=%s", secret, token);
char *reply = curlPostUrl(url, data);