Repository navigation
fix: stop cyclic pagination with typed progress errors - #59
Open
thedogwiththedataonit wants to merge 4 commits into
Open
thedogwiththedataonit wants to merge 4 commits into
thedogwiththedataonit wants to merge 4 commits into
Conversation
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.
When a list endpoint repeats a cursor,
listAll()can fetch the same pages indefinitely. Stop before refetching a known cursor and throw an exportedBrewPaginationErrorwithPAGINATION_CURSOR_CYCLE, the repeated cursor, fetched page count, and already-yielded item count.The iterator follows empty pages with advancing cursors and accepts terminal or missing pagination. An abort between pages still ends iteration quietly, including when it coincides with a repeated cursor; in-flight request cancellation and retry behavior retain their existing contracts. Error documentation explains that yielded partial results are incomplete and the repeated cursor is diagnostic information. The example uses the actual contacts
searchAll()API.Validation at
f82d066fc14ccb6918a28d5cb1c8623c7da4ea0d: Bun 1.3.10 typecheck, ESLint, read-only Prettier check, all 649 tests in 107 files, and ESM/CJS/declaration builds passed. Both built module formats expose the error correctly. Regression coverage includes identical and multi-page cycles, advancing empty pages, terminal pagination, and cancellation while consuming a page with a cyclic next cursor. CI is green on this head.Latest main is merged, including the canonical Figma import link overrides. Regenerate the OpenAPI mirror and types from merged application Stripe PR #2035: six contact-response consent-source unions add
integration, documenting provenance without asserting an opt-in. Request consent-source enums retain their existing contract. The four coordinated application, docs, SDK, and CLI OpenAPI mirrors match SHA-2564d68ab8d4877bca19f206e2153fa2cde65b3240767f033d051fb1b6667aff75f; application Figma PR #2029 is merged. This PR exports an additive SDK API and does not change the package version. Release the SDK before a future CLI dependency update adopts its new API; the companion CLI fix uses its own pagination error and keeps the published SDK dependency.Companion CLI PR #48; coordinated docs contract-sync PR #200; application review PR #2027.