'An unknown error has occured'

So I've got this fairly complex function stack that deals with a somewhat messy XML response I get from an external API.[image.png]The overall goal of the stack is explained by: 
1.  Requesting an authentication token
2. Using that token to request a payload of data.
3. Cleaning up that payload to get right to the section with the items I want to loop through via For Each loop.
4. Instead of saving all of the returned items, I check a field on the item in question to see if it matches an item in my database. If not, move to the next item in the iteration, otherwise, edit that database item with the updated data.
5. I then perform some calcuations between database fields and then update said fields.
6. Check to see if we are at our pagination limit of 10 and if not, update the page number and repeat the While loop.


When I add a 'Stop & Debug' to the very end of the stack, it works. And not just one item, I've tested and found that the For Loop has successfully gone through several items in the loop. But when I run it without a Stop & Debug, it breaks with no info other than 'An unknown error has occured'

Even when I try to run it with the 'Include variable details during run' checked on, no data is displayed. And it ALWAYS fails at around 6 seconds into the run. So I'm guessing it's something odd happening with my external API (both API calls are to the same provider and each call is limited to 100 calls every 60 seconds) or my While loop is breaking something.

I'm not looking for a fix for that per se, I'm more so interested in figuring out how I can get specific errors that can point me to the problem instead of just a vague one.
Working with APIs
1 reply