SuiteProjects Pro Error

When using the SuiteProjects Pro connector all of my export jobs get this error:

{"message":"Invalid limit and offset values. The offset must be divisible by the page limit"}

The export itself seems to work and I'm getting data. How can I correct this?

Does that connector use SuiteQL or some sort of query? I've ran into this before with SuiteQL and had to play around with the offset and limit clause I was sending.

I don't think it uses any SuiteQL, but I could be wrong. The documentation doesn't mention anything about it: NetSuite Applications Suite - REST API

What does your pagination setup on your Celigo export look like now? The default limit is 100 if you don't send it, and we auto-send the offset based on the count of records we get back. My guess is you're hitting something like this:

  • First API call: offset = 0, limit = 100 → 100 results back
  • Second API call: offset = 100, limit = 100 → 33 results back
  • Third API call: offset = 133, limit = 100 → error, because 133 isn't divisible by 100

Per the SuiteProjects Pro REST docs: "The offset must be a positive number divisible by the page limit." Setting the limit to a value that divides cleanly into your total (or switching to a pagination strategy that increments offset by limit, not by returned count) should get you past it.

So this should only be happening to you on the last API call we make where we wouldn't have gotten any results returned anyways. So you could do a couple things:

  • Try using Page number parameter as the paging mechanism and Override page number start index = 0. In your relative uri, try: /endpoint?limit=100&offset={{multiply export.http.paging.page 100}}
  • Since the response includes meta.totalPages and meta.totalRows, you could also configure a last-page indicator on the export so we stop paging before that final throwaway call ever fires — the error never surfaces and you don't have to change your pagination strategy.

Hi Tyler,

My paging looks exactly like your above. I tried the endpoint you shared but get an error that I must use the export.http.paging.skip.
image

Here is the full original setup I had:

Can you try this?
/endpoint?limit=100&offset={{multiply export.http.paging.page 100}}&dummy={{export.http.paging.page}}

It seems that once it reaches the 3rd page it goes out of bounds:

Request:

{
    "url": "https://jenzabar-inc.app.netsuitesuiteprojectspro.com/rest/v1/users/?limit=100&offset=300&dummy=3",
    "method": "GET"
}

Error:

{
    "message": "The specified query parameter 'offset' is out of bounds. Provide value between 0 and 200"
}

So it looks like we're making a subsequent page request even though we hit maybe 180 records? What's the response from the 2nd API call look like?

Here is what the response looks like (with the data stripped):

{
    "message": "success",
    "meta": {
        "rowsPerPage": 100,
        "totalPages": 3,
        "totalRows": 235
    }
}

Gotcha, so API calls are:

  1. limit 100, offset 0, you get 100 records
  2. limit 100, offset 100, you get 100 records
  3. limit 100, offset 200, you get 35 records, then we should stop here
  4. limit 100, offset 300, you get the error

And you confirm you're doing this with meta.totalPages set?
/endpoint?limit=100&offset={{multiply export.http.paging.page 100}}&dummy={{export.http.paging.page}}

If you have that setup, we should not be making that 4th API call. Adding @prudhvivemulapati here as our product manager for HTTP connector and he is currently doing some work around pagination and maybe there is a bug here.

For now, can you make a preSavePage script that filters out this particular error? Doing this would make sure the job doesn't fail just because of this issue.

function preSavePage (options) {
  options.errors = options.errors.filter(e =>
    !e.message.includes('The specified query parameter 'offset' is out of bounds.')
  )
  console.log(JSON.stringify(options.errors))

  return {
    data: options.data,
    errors: options.errors,
    abort: false,
    newErrorsAndRetryData: []
  }
}

Thanks Tyler. Yes I do have the page parameter set:

I tried the preSavePage script and it seems to have filtered out too many records. It ran without error, but I only saw 4 records come through.

Can you try again? I made a small tweak to the script in my last reply.

That seems to have fixed it. I was able to run it without error and see all records come through.