Closed jimallman closed 9 months ago
This change is working well for me on dev, try for example:
curl -v https://devapi.opentreeoflife.org/v3/tree_of_life/subtree -d '{"format":"arguson","height_limit":3,"node_id":"ott372706"}' -vvv
This returns the complete payload, but with a 400 Bad Request
status, as desired:
// lots of JSON payload
},
"mrca": "mrcaott47497ott110766"
},
"message": "[/v3/tree_of_life/subtree] Error: node_id was not found (broken taxon).\n"
}
We were previously discarding the contents of non-200 responses, but we want to be more discriminating. We should return any payload if possible, regardless sub-500 responses, AND cache the response.
NB - This is working now on devtree