aboutcode-org / aboutcode-org/purldb

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

Đang mở
#532 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug data
Ngôn ngữ chính
HTML
Star
67
Fork
69
Merge trung bình
8 ngày 8 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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](https://github.com/aboutcode-org/purldb/blob/main/packagedb/api.py#L980-L989).

- For example, according to the [ConanCenter](https://conan.io/center/recipes/alpaca), the only version of alpaca is 0.2.1, and a query for 0.3.0 (`/api/collect/?purl=pkg:conan/alpaca@0.3.0`) throws the error.

- OTOH, [NPM](https://www.npmjs.com/package/log4js) tells me the latest version for log4j is 6.9.1, and a query for 7.0.0 (`/api/collect/?purl=pkg:npm/log4js@7.0.0`) returns a JSON object informing me that the package does not exist.

```
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"
}
```

- Similar result for the [MVN Repository](https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind), which tells me the latest version of Jackson Databind is 2.17.2 and responds to a `collect/` query for 2.20.0 with

```
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"
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.