foojayio / foojayio/discoapi

`/packages` sometimes returns `null` packages in the JSON array

Open
#132 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
154
Forks
17
PR merge metrics
No merged PRs in 30d

Description

When calling the `/packages` endpoint, sometimes some null elements are returned in the `result` array.

I got the problem for instance with this call:
https://api.foojay.io/disco/v3.0/packages?jdk_version=21&latest=available&package_type=jdk&distribution=temurin&distribution=zulu&distribution=corretto&distribution=jetbrains&distribution=oracle_open_jdk&distribution=microsoft&distribution=bisheng&distribution=dragonwell&distribution=kona&distribution=liberica&distribution=openlogic&distribution=sap_machine&distribution=semeru&distribution=oracle&distribution=zulu_prime&distribution=semeru_certified&architecture=x86_64&archive_type=tar.gz&archive_type=tgz&archive_type=zip&operating_system=linux&libc_type=glibc&javafx_bundled=false&directly_downloadable=true

```
Unexpected JSON token at offset 10822: Expected start of the object '{', but had 'n' instead at path: $.result[12]
JSON input: .....size":206305105,"feature":[]},null,null,{"id":"8db33905b983f.....
```

Sorry that the exception doesn't give me the full JSON body, but we can see enough in the little fragment + the JSON path.

Is this expected? Should I just accept that there might be nulls in the array and filter them out on the client side?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.