monarch-initiative / monarch-app

Monarch Initiative website and API
https://monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Add fallback behavior for non-canonical IDs #416

Open kevinschaper opened 8 months ago

kevinschaper commented 8 months ago

In our request logs, I see a lot of linking to /gene/NCBIGene:123 - we should gracefully handle non-canonical IDs.

I think gracefully could mean that we still return the gene, or that we return a 302 redirect if it's searching for the provided ID only returns one result.

If more than one result matches, we could redirect to a search page for the ID.

kevinschaper commented 8 months ago

It looks like we aren't calling it a 404 when we get a request like http://monarchinitiative.org/gene/NCBIGene:8625023 and instead we actually show the search page.

kevinschaper commented 8 months ago

NCBIGene:8625023 actually isn't found by searching, but should be, since it's the NCBI ID for https://monarchinitiative.org/dictyBase:DDB_G0285275