radicle-client-services
radicle-client-services copied to clipboard
http-api: Amount of projects fetched from /v1/projects wrong
It seems that by filtering out projects that return an Err
we do not provide the amount of projects asked from the endpoint.
This probable happens when obtaining their Info
, after doing the pagination with skip
and take
.
My idea is that we should get and validate the projects info during the iterator, so we always can return the asked amount.
To reproduce the issue, try for example https://maple.radicle.garden:8777/v1/projects?per-page=10&page=2 and I obtained 6 instead of 10 projects.
Hmm, are there really 4 projects that fail on that second page? Seems weird..
Alternatively, we should change the iterator to not count failed projects, so we get 10 valid projects.
Alternatively, we should change the iterator to not count failed projects, so we get 10 valid projects.
Yes I think that should be the way to do it.
This is superseded by https://github.com/radicle-dev/heartwood/issues/179