Repository navigation
fix: route worms taxa provider through Fast WoRMS to avoid 500s - #36
jacobptnguyen wants to merge 1 commit into
Conversation
The worms taxa provider returns a 500 error for any rank other than genus (species, family, etc.). This routes worms queries through the existing fathomnet.api.worms client instead, which handles every rank correctly. Other providers are unchanged.
|
Hi @jacobptnguyen , thanks for the contribution! Can you give me some more details on the calls that are giving you 500s? By the way, the |
|
@jacobptnguyen Can you provide example code the duplicates the error? |
|
@kevinsbarnard From the server logs, my guess is that Jacob was trying to get a very large taxa branch from the server. Since everything was running in memory, I was using Vert.x event loop for all calls. But building the JSON for large branches takes a relatively long time (> 2000 ms), so Vert.x was killing the response. I've moved the taxa calls to their own worker pool of threads. (See PR fathomnet/worms-server#15) So this seems to address any issues from the worms-server itself. Test casecurl -X 'GET' \
'http://database.fathomnet.org:8888/taxa/descendants/Animalia' \
-H 'accept: application/json' > Desktop/Animalia.jsonRuns in about 6 seconds on my 10G connection and creates a 121.6MB file. FollowupIf Jacob provides sample code that still produces the error we can investigate further. |
|
Hey @kevinsbarnard and @hohonuuli, I was trying to solve issue #35. The issue said that taxa.find_taxa("worms", "MYCTEROPERCA MICROLEPIS") returns 500. |
|
@jacobptnguyen Thanks for your contribution, it’s very much appreciated. I investigated the root cause in #35 and have fixed it in the upstream REST API we use to retrieve data from WoRMS, which is the most appropriate place for the change. Since the issue is now resolved upstream, I’ll close this pull request without merging it. |
The worms taxa provider returns a 500 error for any rank other than genus (species, family, etc.). This routes worms queries through the existing fathomnet.api.worms client instead, which handles every rank correctly. Other providers are unchanged.