Pagination doesn't work correctly for service.listTileset() method
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 768
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
Pagination doesn't work correctly if we add any options to the request, e.g. `type` or `visibility`. Here is an example of code (I'm not sure how to create an executable example without exposing my access token):
```js
const service = tilesetsService({accessToken: ''})
const response = await service.listTilesets({
ownerId: '',
type: 'vector',
visibility: 'private',
limit: 5
}).send()
await response.nextPage().send()
```
The first request works fine, but the second one returns code `400` and message
```
The requested url's querystring "type" property must equal "raster" or "vector".
```
Without `type`, `visibility`, and `limit` options, everything works great!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the service.listTilesets() example, using type, visibility, and limit before calling response.nextPage().send(). Inspect how pagination builds the follow-up request and verify that the original options are preserved; done means the second request succeeds with the same filters and limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100