OpenTreeOfLife / otindex

opentree index using postgres and pyramid
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

behaviour of find_trees with ottTaxonName #42

Open kcranston opened 7 years ago

kcranston commented 7 years ago

What should happen in these two cases:

josephwb commented 7 years ago

For ottId a bad id returns:

{"matched_studies": []}

So a bad name should do the same. Or update both to be more explicit.

kcranston commented 7 years ago

Simply returning an empty list doesn't differentiate between "there are no trees for this taxon" and "this taxon does not exist". If that distinction is useful, then we should probably return a 400 for the latter case.

Still open question about what to do in cases where the name matches multiple IDs. Is that an error, too?