Data from API not loading consistently

Anyone might know why this set up is not performing well? I have a repeating group containing the user’s stock portfolio. I set up a text box that calls to IEXcloud to get the current stock price. Sometimes it works, sometimes it doesn’t. When it doesn’t work, I just get an unknown error from the Bubble debugger. The API gets called when the repeating group is shown on the page, which is when a custom state changes. Would it work better if the API is done through a backend API call instead?

It’s hard to help with provided information.
Maybe you can inspect the API call in the text field you have and also in Log in Bubble?
You can also use Browser “network” in dev console to see the response of the API.

Here is what happens when the data doesn’t load

This problem seems to be most reproducible when there are more than 2 items in the repeating group

Nevermind, I figured out the solution. It seemed like the problem was that if there were too many items in the repeating group, the API would fail. I guess you can’t have Bubble tried to make so may API calls at the same time. So now I have a backend API workflow to handle it, and that works perfectly well.

1 Like

You can also consider using a state and filter the payload.

This topic was automatically closed after 70 days. New replies are no longer allowed.