Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove order query param from manual_journals request #104

Merged
merged 3 commits into from
Dec 30, 2022

Conversation

bryantgray
Copy link
Contributor

@bryantgray bryantgray commented Dec 29, 2022

Description of change

The Xero API currently has a bug where all manual journal records created or modified since the last bookmark are returned instead of 100 per page. Xero support noticed this only happens when order is added as a query parameter in the request.

The tap pages through results until the response has fewer than 100 records, as recommended by Xero. The bug was causing the paging logic to loop until the API quota was exceeded when there were 100+ manual journal records in the response.

This temporary fix removes the order query parameter when retrieving data for the manual_journals stream until Xero fixes the bug. It was previously order=UpdatedDateUTC ASC. Xero's docs say "The default order is UpdatedDateUTC ASC" so the response will still have the data in the expected order.

Manual QA steps

  • Created 150 manual journal entries
  • Verified paging works as expected
  • Verified the order is still UpdatedDateUTC ASC

Risks

  • Xero changes their default to something other than order=UpdatedDateUTC ASC.

Rollback steps

  • revert this branch

@bryantgray bryantgray merged commit 16dd78c into master Dec 30, 2022
@bryantgray bryantgray deleted the TDL-21556-fix-manual-journals-pagination branch December 30, 2022 15:53
dimitar-petrunov-sagedata added a commit to SageData-OOD/tap-xero that referenced this pull request Feb 16, 2023
Remove `order` query param from manual_journals request (singer-io#104)
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.

2 participants