I am updating records in an external database using PATCH, and it works absolutely fine. There is nothing wrong that I can see. However, Bubble returns an error:
Here is a screenshot from API Connector:
Any idea what’s going on here?
I am updating records in an external database using PATCH, and it works absolutely fine. There is nothing wrong that I can see. However, Bubble returns an error:
Here is a screenshot from API Connector:
Any idea what’s going on here?
Well it looks like your trying to change the value of your API call response, which isn’t possible. You can only use the “make changes” workflow to change items on Bubble’s database.
What exactly are you trying to do? It’s also easier for people to help if you can replicate it or provide a public link.
Thanks for the reply, Nate. I’m creating/updating records (name, phone number, etc.) in an external database using dynamic data that the user inputs from the bubble app. Sometimes the app needs to create a new record (i.e. POST) on the external database and sometimes the app needs to update that record (i.e. PATCH, as in the case shown above).
I’ll see about trying to make it public, but I’m not if it will be useful without the authorization key inside to POST and PATCH. The use-case here is taking/updating support orders and submitting them into an agent fulfillment system. I have noticed that when I am doing a POST, it actually adds two records (a record, and a duplicate of that record) instead of just one. When I copy the API connector info into Postman, Postman does not replicate the issue of duplicating records. Here is my POST setup inside Bubble, which essentially takes a customer ticket from the app, pulls the customer info from Database B (another external database), and then POSTs the support ticket w/ customer info to Database A (i.e. the fulfillment database that ends up getting a duplicated ticket submission):
Here is the API Connector Setup:
I can’t figure out why Bubble is POSTing twice, unless there is somekind of infinite loop happening that is being terminated on Bubble’s backend. What do you think?
Ok. It’s still a bit hard to decipher with only having the names of the API calls, and without seeing exactly what is going on.
One thing I will say is that it looks like that you’re using all of your API calls as Data in Bubble. Have you tried using them as Actions instead?
It’s easier to use the debugger to figure out what is wrong when they’re set up as Actions, because if there’s an obvious issue, it will return a workflow error. When the call is used as Data, you won’t get an error message, and the Data just won’t load. Might give you some clues about the double POST error.
I honestly only use API calls as Data when I need to display them in a Group/Repeating group or to plug the API call into another workflow (like getting an access token).
Good advice. Setting up the call as an Action did get rid of the Bubble error, but it still duplicates data and no error is being returned while going through the debugger.
I did find a workaround for this issue: Inside of the workflow, I do a blank POST (which just creates a database record, rather than filling it with values) and amazingly there is no duplicate record created. Then, I initiate a PATCH to enter in values for that newly created record. In other words: POST new record–> PATCH values to that same record = no double post. Strange, but it works.
So we’ve narrowed it down to being a duplication issue only when API connector has values in the POST. I should probably make a database on AWS and try to repeat the error, so we’ll know if it’s the Database As a Service provider’s issue or API Connector’s issue.
Hi I am having same problem, I am not able to update data of another Bubble APP.
I have two bubble APP, Using one APP i need to update data of another APP.
Please guide me on this.