foojayio / discoapi

The foojay discovery api (discoapi) is made to discover java packages (jre/jdk) from different distributions.
GNU General Public License v2.0
107 stars 12 forks source link

Error when filtering on `lib_c_type` in the packages API #68

Closed marcwrobel closed 1 year ago

marcwrobel commented 1 year ago

When sending the following query I got an error. The same query without lib_c_type is OK.

$ http 'https://api.foojay.io/disco/v3.0/packages/jdks?version=17.0.5%2B8&distribution=zulu&architecture=aarch64&archive_type=tar.gz&operating_system=linux&lib_c_type=glibc&release_status=ga'
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Length: 379
Content-Type: application/json
Date: Wed, 04 Jan 2023 09:33:30 GMT

{
    "_embedded": {
        "errors": [
            {
                "message": "Internal Server Error: Cannot invoke \"java.util.List.isEmpty()\" because \"libc_type\" is null"
            }
        ]
    },
    "_links": {
        "self": {
            "href": "/disco/v3.0/packages/jdks?version=17.0.5%2B8&distribution=zulu&architecture=aarch64&archive_type=tar.gz&operating_system=linux&lib_c_type=glibc&release_status=ga",
            "templated": false
        }
    },
    "message": "Internal Server Error"
}
HanSolo commented 1 year ago

Will take a look st when I’ll be back from vacation. Thx for reporting 👍🏻

HanSolo commented 1 year ago

The problem was a missing underscore, should be fixed by now.