aboutcode-org / purldb

Tools to create and expose a database of purls (Package URLs). This project is sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase/ and nexB for https://www.aboutcode.org/ Chat is at https://gitter.im/aboutcode-org/discuss
https://purldb.readthedocs.io/
35 stars 23 forks source link

collect/ endpoint query for conan PURL with non-existent version returns 'Server Error (500)' #532

Open johnmhoran opened 3 months ago

johnmhoran commented 3 months ago

Using the local collect/ endpoint to populate my local DB, if I search for a conan type with a version that does not exist, I get a Server Error (500). This does not happen with at least some of the other supported types in the CollectViewSet() class list.

GET /api/collect/?purl=pkg:npm/log4js@7.0.0

HTTP 400 Bad Request
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "status": "error(s) occurred when fetching metadata for pkg:npm/log4js@7.0.0: Package does not exist on npmjs: pkg:npm/log4js@7.0.0"
}
HTTP 400 Bad Request
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "status": "error(s) occurred when fetching metadata for pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.20.0: Package does not exist on maven: pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.20.0\nPackage does not exist on maven: pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.20.0?classifier=sources\n"
}