NewPath-Consulting / warm

Pro Reports for Wild Apricot is a Google Data Studio connector that helps Wild Apricot administrators understand your organization’s membership engagement, renewal rates, and demographics. Trend your revenue and get expense analyses. Whatever your question, enjoy all the organized data you need at your fingertips to make the business decisions want.
https://newpathconsulting.com/warm
GNU General Public License v3.0
5 stars 4 forks source link

InvoiceDetails object returns error 500 #97

Open asirota opened 1 year ago

asirota commented 1 year ago

When trying to use InvoiceDetails on any report, the following is returned.

Wild Apricot API returned an error: Exception: Request failed for https://api.wildapricot.org returned code 500. Truncated server response: {"Message":"An internal error has occured. Please contact Wild Apricot support.\r\n Request ID:23acf3f4-ccb0-40f0-be16-90ec073dbdb2."} (use muteHttpExceptions option to examine full response)

This is a complex report object that iterates through all available invoice IDs and returns details on each ID to Looker Data Studio.

asirota commented 1 year ago

I've identified why the error is being hit at least. It seems our first call to get the list of invoice IDas per the criteria is sending a query parameter called $skip set to 0. This was working before but now sends an error 500.

The API call we are sending to get a list of invoice IDs is

/accounts/:accountId/invoices?unpaidOnly=false&includeVoided=true&idsOnly=true&StartDate=2023-01-01&EndDate=2023-12-31&$top=100&$skip=0

If the list of identifiers is larger than $top value then we have to paeg and set skip to the next set of IDs, but we always start with 0 and that appears to now throw a 500 error.

asirota commented 1 year ago

I opened a support ticket to see if the API behaviour has changed under ticket ID 1464514