I'm calling the Xero Accounting API to add a bunch of manual journals.
In the latest case, the query ended up returning "Unexpected error occurred while running query" after 480 seconds. However, when I look at the API history on the Xero side, I see the call completed in just over a second (see screenshot below). And the journals were successfully inserted into Xero.
This sort of behaviour has been happening whenever I do PUT or POST calls to the Xero API. GETs work fine. Other APIs (eg HubSpot) are working fine as well.
I'm at a lost for what is going on - hopefully someone can help?
True, I can run API call in Retool query library and get response, but when run same query to same end point in editor panel, the response body show Null
Sorry for the late reply here @maxamillian, took me a bit to set up and attempt to reproduce the behavior. The PUT requests I'm sending seem to return properly though so I imagine I'm missing something from your setup:
If you run the query with the example data from xero do you see the same issue? There have been a couple releases since you mentioned the behavior so it's also possible that it was fixed in the interim but in case it hasn't been, any other additional information you can provide about your setup would be much appreciated!
This is a small post - 2 journals with a total of 8 line items. Usually they're bigger, and when I attempt to post a bigger journal via retool, it times out, but the post is still successful from the Xero side! When I post those bigger journals directly via the Xero API Explorer, it has no trouble dealing with it, and the response is prompt.
This is the payload (with descriptions anonymised) for this particular post:
Still no luck using that same data since it looks like you both may be using the New Zealand API I'm wondering if overriding the outbound Retool region on your instance has any effect on the result. My guess would be that us-west-2 would be better ultimately but it may still be worth a try.
Even though I haven't been able to reproduce this I'll still log it as a bug for further investigation. Thanks for surfacing the issue here!