Empty result from API

Hi,
although being a rare event, I experienced export and download API returning an empty template. I have implemented a retry mechanism with 5 secs pause but this does not solve the problem. Do you have any suggestions or had similar issue? Thank you.
Answers
-
Can you clarify how you are using this template? Are you using it to export expense data (i.e. expense reports or line items)?
If so, can you share some more context so I can have a closer look on my side? I see some test reports in your account and assuming you've been using these?
-
Hi Michael, I use this account more for testing and get familiar with Expensify API.
I actually use another account that has more meaningful data for business purposes and it's where I had this issue. But I use the same template in both cases.
I am using a json-like template to export reports and expense data (everything).
Template is the following:
<#if reports?size gt 0 > {"reportsList" : [ <#list reports as report> { ....(other stuffs) </#list> ]} <#else> {"reportsList" :[]} </#if>
Sometimes I got
`key not found: reportsList` so I assume result is empty since as the template is defined it should always returns reportsList in the JSON.
-
Hi @Michael Haxhiu , I was checking again my logs and I realised that actually the retry mechanism sometimes solves the problem. So dunno, it looks to be a transient thing.
-
Hmm interesting. Let's keep an eye on it and see if the issue continues. Sounds like it's working now. 👍