Skip to content

Fix pagination return value in request method#9

Closed
mo5h wants to merge 1 commit into
mainfrom
pe-1481-fix-pagination-return-value
Closed

Fix pagination return value in request method#9
mo5h wants to merge 1 commit into
mainfrom
pe-1481-fix-pagination-return-value

Conversation

@mo5h
Copy link
Copy Markdown

@mo5h mo5h commented May 13, 2026

Summary

  • request conditionally appended next_page only when paginate was true, returning a 2- or 3-element array
  • Subclasses (e.g. Okta::Management::Client) that destructure with response, status = super(...) silently dropped the third element, making paginate: true a no-op
  • Now always returns [data, status, next_page] (with nil when not paginating) so subclass overrides propagate the cursor correctly

The request method conditionally appended next_page only when paginate
was true, returning a 2- or 3-element array. Subclasses that destructure
with `response, status = super(...)` silently dropped the third element,
breaking pagination. Always return [data, status, next_page] so
subclass overrides propagate the cursor correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mo5h mo5h changed the title [PE-1481] Fix pagination return value in request method Fix pagination return value in request method May 13, 2026
@mo5h mo5h closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant