Query with a well-formed ID fails
Closed this issue · 1 comments
I encountered a handful of pypi
libraries today for which the API throws a 500 error without explanation.
For example, all of these:
curl -X GET "https://api.clearlydefined.io/definitions/pypi/pypi/-/slip.dbus/0.6.4" -H "accept: */*"
curl -X GET "https://api.clearlydefined.io/definitions/pypi/pypi/-/python-dmidecode/3.12.2" -H "accept: */*"
curl -X GET "https://api.clearlydefined.io/definitions/pypi/pypi/-/blivet-gui/2.3.0" -H "accept: */*"
Answer this result:
{"error":{"code":"500","message":"An error has occurred","innererror":{}}}
My expectation is that I should get something back.
For completeness, I'm actually using the API to submit many IDs at the same time, and -- if any one of them is bad (for whatever reason) -- I get a 500 on the entire lot. I have an algorithm that does a divide and conquer to grab data for the valid ones and identify the problematic ones, but that runs the risk of butting up against the API limit which is the entire reason why I'm trying to batch things.
For example, two of the entries in the following query are valid and return valid results when the third (slip-dbus
) is removed.
curl -X POST "https://api.clearlydefined.io/definitions" -H "accept: application/json" -H "Content-Type: application/json" -d "[\"pypi/pypi/-/sos/4.3\",\"pypi/pypi/-/slip.dbus/0.6.4\",\"pypi/pypi/-/spdx-tools/0.7.0a3\"]"