Hey there, @RA_SYD!
I think you should make code1
a loop block and turn query1
into a function. In code1, you'd be able to use the APIACCOUNT as the source array and then build the scripting logic for error handling using a try catch. The loop block will let you send the data in batches of your preferred size and allows you to delay between iterations.
This post keeps becoming relevant, lately: Loop block tells me to refer to {{ value }}, then says it's undefined - #2 by pyrrho