monarch-initiative / biolink-api

API for linked biological knowledge
https://api.monarchinitiative.org/api/
BSD 3-Clause "New" or "Revised" License
63 stars 25 forks source link

Check for facet_counts before creating closure bins #218

Closed deepakunni3 closed 6 years ago

deepakunni3 commented 6 years ago

Fixes a bug reported by @DoctorBud

There appears to be a bug with use_compact_associations=true and the /bioentity/disease/ID/phenotypes endpoint. For example, this works fine: https://api-dev.monarchinitiative.org/api/bioentity/disease/MONDO%3A0007947/phenotypes?rows=100&fetch_objects=false&use_compact_associations=false

but this will return Internal Server Error: https://api-dev.monarchinitiative.org/api/bioentity/disease/MONDO%3A0007947/phenotypes?rows=100&fetch_objects=false&use_compact_associations=true

The other /bioentity/disease/ID/* endpoints work fine with use_compact_associations=true. I think it's just a plain-ole-bug somewhere.

Note to self: Check the need for closure_bin and implement in other API calls as needed