Skip to content

[Bug] Paginate fails with exactly 250 results #59

@yannick-beot-sp

Description

@yannick-beot-sp

This is issue is linked to yannick-beot-sp/vscode-sailpoint-identitynow#117.
I'm using the following code:

const api = new TransformsApi(apiConfig);
const result = await Paginator.paginate(api, api.listTransforms);

And it faills when trying to call https://removed-customer.api.identitynow.com/v3/transforms?offset=250&limit=250 with 400 error:

{"detailMessage":"Specified offset is invalid.","stackTrace":[],"suppressedExceptions":[]}

I don't know if it's specific to transform endpoint or if it is more general.

To Reproduce Steps to reproduce the behavior:

  1. Create 250 transforms
  2. Use Paginator.paginate to paginate the call to listTransforms

Expected behavior
Either Paginator.paginate is not trying to get the next page or the endpoint should not return a 400 or Paginator.paginate may swallow this "Specified offset is invalid." error.

Additional context
Function used in the VSCode plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions