API 200 response does not execute


#1

Hi, I added an API from bubble, everything looks good so far, my data was entered into the database.

My problem is that I added action under the 200 workflow success but that action isn’t triggered. I tried a simple action such as show a toast, and that didn’t even work either.

Any thought?


#2

Hi @rkresnadi, I’d first check what response is coming back when the request runs using the network log in Dropsource. If the 200 is coming back but the action is not executing that would typically be caused by the swagger spec not matching what the api is returning. It might not be that but that’s where I would start looking (first if you can verify the response coming back is 200 in the network log).


#3

I am not able to test using dropsource network log because my app doesn’t work in the simulator. My app keeps crashing on simulator because simulator has issues with map and reverse geocode.

I did, however tested using swagger editor and it returned the 200 with the value I expected.

But in the 200 event, did trigger anything even a simple show toast.


#4

Your app shouldn’t crash in the simulator when using the reverse geocode action so I would recommend trying to troubleshoot that, if you’re using geolocation (detecting the user location) that won’t work reliably in the simulator but it shouldn’t crash, and the reverse geocode action should be fine in there.

There’s a limit to what I can suggest here unless you’re able to get it running in the simulator so that you can use the network log, but my guess would be that the swagger spec for the endpoint perhaps doesn’t match the structure that’s being returned - easiest way to check this is using the network log.

I’d recommend trying to get that map functionality working in the simulator or perhaps test your request while avoiding the crashing area (e.g. run the request on a separate page or something) - need to be able to isolate the issue in order to investigate it effectively.


#5

reverse geocode definitely not working in a simulator. I tested in other page, and run toas if address is found, and it never did.

the network log is showing reverse geocode pending. it is always pending.


#6

anyway, regarding the execution after 200 response, there are some bugs on my part which I have fixed it. But the problem can still exist if we have bad network connection. not sure how to fix it… it’s a payment gateway web page that may take a while to open, or not open at all.


#7

Hm am doing some investigating into the reverse geocode action because I believe it worked on the simulator in the past, I’ve used it in various demo apps but am now seeing what you are and it isn’t returning the info… :thinking:

Apologies for the confusion there, wondering if the implementation changed recently or something. In any case if it doesn’t work in the simulator we should be indicating that in the action so I’ll follow this up with the team.

The only tool we currently have available for responding to device connectivity issues is the new Network Connection Changed event you’ll see on each page of your app, might be worth trying to use that to respond to connection drops - we have an example of how you could use that with an If Else here: