Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query with a well-formed ID fails #957

Closed
waynebeaton opened this issue Nov 7, 2022 · 1 comment
Closed

Query with a well-formed ID fails #957

waynebeaton opened this issue Nov 7, 2022 · 1 comment

Comments

@waynebeaton
Copy link

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\"]"
@lumaxis
Copy link
Contributor

lumaxis commented Feb 23, 2024

Confirmed that this is fixed by #1016 in our staging environment – fix should be rolled out soon!

@lumaxis lumaxis closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants