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

Using ifModifiedSince with getLeaveApplicationsV2 causes an error #644

Closed
haydn opened this issue Jul 5, 2023 · 3 comments
Closed

Using ifModifiedSince with getLeaveApplicationsV2 causes an error #644

haydn opened this issue Jul 5, 2023 · 3 comments

Comments

@haydn
Copy link

haydn commented Jul 5, 2023

SDK:

  • Version 4.35.0

Describe the bug

If you use the ifModifiedSince argument with the xero.payrollAUApi.getLeaveApplicationsV2 method you'll get a 500 error back.

To Reproduce

Steps to reproduce the behavior:

  1. Set-up a client and connect it to a Xero tenant that's using AU payroll.
  2. Try to retrieve the leave applications using the getLeaveApplicationsV2 method by passing both a xeroTenantId argument and any date for a ifModifiedSince argument.

Alternatively, you can see the underlying issue by doing a cURL request with the If-Modified-Since header included:

curl 'https://api.xero.com/payroll.xro/1.0/LeaveApplications/v2?page=1' --header 'Xero-Tenant-Id: {ID}' --header 'Accept: application/json' --header 'Authorization: Bearer {TOKEN}' --header 'If-Modified-Since: 2023-07-05T07:43:38.820Z'

You'll get this response back:

{"Title":"An error occurred","Detail":"An error occurred in Xero. Check the API Status page http://status.developer.xero.com for current service status.","Status":500,"Instance":"c1ba9d6b-f0c7-4109-9364-ffdb6744909e"}

Expected behavior

It should accept the header and return only the leave applications modified since the given date as documented here:

https://developer.xero.com/documentation/api/payrollau/leaveapplications#optional-parameters

Screenshots

N/A

Additional context

N/A

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

PETOSS-313

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Thanks for raising an issue, a ticket has been created to track your request

@Sallyhornet
Copy link

This is an error with the Xero API not an error in the SDK. A fix has been released for this within the Xero payroll API

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

No branches or pull requests

2 participants