Skip to content

fix: drop the other cursor in GetNextPage - #680

Draft
Justin Hammond (Justintime50) wants to merge 1 commit into
masterfrom
fix_next_page_cursor
Draft

Justin Hammond (Justintime50) wants to merge 1 commit into
masterfrom
fix_next_page_cursor

Conversation

@Justintime50

Copy link
Copy Markdown
Member

Description

GetNextPage built the next page's params from the original All filters and only set BeforeId, so a list started with AfterId sent both before_id and after_id on the next page, which the API rejects with a 400 ("Only one of before_id and after_id may be specified."). Every BuildNextPageParameters that sets BeforeId now clears AfterId first, and the batch one (which pages with AfterId) clears BeforeId. Child users only page with AfterId, so they're unchanged.

Testing

  • Added TestGetNextPageDropsAfterId, which builds the next shipment page from filters with AfterId and checks only BeforeId is set. It fails without the fix.
  • The unit tests pass on net10.0, and the StyleCop build has no errors.

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant