Repository navigation
Conversation
--paginate returned part of a list as if it were the whole list when:
- a SCIM list's server page was smaller than the page asked for, although
totalResults said there was more;
- an endpoint repeated a page, ignoring the paging parameters;
- the next-page link pointed at another host;
- a Contact Center list returned a full plain array, or {data} with no
page metadata (only the first 100 items were read).
Full plain arrays and pages without metadata now lead to another request,
SCIM lists are read to their totalResults, and the other cases fail with
"incomplete list". A repeated page longer than the page asked for still
ends the list, since the endpoint returned everything at once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--paginatecould return part of a list as if it were the whole list. Two problems:1. It stopped early without saying so (
paginateOffset, used for Admin, Calling, Messaging, Meetings, Devices and SCIM lists):totalResultssaid there was more.2. Contact Center lists with no page metadata were read as one page (
visitCC):includePagination, was always taken as the only page. A list longer than 100 lost everything after its first 100 items.{data}without metadata: the same happened to a{data}response with nometaorpageInfo.What changes
totalResultsis reached. If the list ends before its total, the command fails.{data}, now leads to another request; a shorter page ends the list.incomplete listinstead of returning what was read so far.--paginatehelp, README, getting-started page and skill say it fails rather than returning part of a list.Tests
internal/client/pagination_test.go, written first. Eight failed on main.TestDoPaginatedStopsWhenOffsetIsIgnoredbecameTestDoPaginatedFailsWhenAFullPageRepeats.TestDoPaginatedIgnoresLinkToAnotherHostbecameTestDoPaginatedFailsOnALinkToAnotherHost, which still checks that only one request is made.go vet ./...andgo testfor every package, one at a time: pass.--paginatelists acrosscc,admin,calling,messaginganddevicereturn the same counts on main and on this branch, up to 600 items formessaging rooms list, which pages by Link header.admin people listerrors identically on both.--size 5 --page 0/1) hold different flows. The endpoint honourspage, so main did cut such lists off at 100.🤖 Generated with Claude Code
https://claude.ai/code/session_01JAtGHcFAKjQdB6dwDKd8mW
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.