additionalScope : bug

Hello,

I just succeeded in performing the additionalScope function but the problem is that I have +500 data to make +500 api calls with additionalScope...

The problem is that it randomly returns undefined which should have values.

Do you know why? Is there a way to correct this?

Thanks



Hi @Geool It looks like prestahop_get_budgets is returning undefined at that particular trigger.

To debug why that is, I'd recommend using the debug tools to see what value was passed to the query via additionalScope.

Then, you can try running prestahop_get_budgets with that value hardcoded to see if you still get undefined.

Is there any chance that you're hitting rate limits with the API or do you expect it to be able to handle 500+ calls?

Yes I think the api is capable of receiving +500 api calls.

But when I press "run" the application is slow, and takes a long time before sending me back completely random results which I think are not due to the number of calls on the api but maybe to the response time...

Because the screenshots of the two requests above were called in a row without waiting and I see well that it is random and that the more we go towards the end of 500 calls, the more there is "undefined"

The debug mode is not useful here I think or it is an additionalScope with a request Get of prestashop api

Hi @Geool

Looking at the debugger will show the exact input that was passed to the query at the time that prestahop_get_budgets returned undefined, but if it's more of a timing issue, it could maybe be helpful to test with a smaller amount of data in arr. For example, does it work more consistently if you only trigger 25 api calls?


For solving the timing issue, it might be helpful to add a delay between each run or do the get requests in batches. This community post has some code that may help!