How catch POST result error in workflow

Good afternoon, I am trying to capture an error when making a POST request.

In the following image, I show my endpoint in the apiconnector.

When initializing the call, I get an array very similar to this:
Screenshot_61

But in case of an error, I get the following JSON as a response:
Screenshot_62

With this in mind, my workflow works as follows:

I call the API to perform the POST
Screenshot_56

I load the response into a group in the editor to validate
Screenshot_57

In the editor, the response does not appear in case of an error as shown in the 2nd JSON above.

How could I capture the message of the error and print it in the Text of the editor?

I appreciate constructive answers.

I will tell you what I have done, maybe it would work for you too?

In the same workflow chain that you have your "Display Data - Result of step 1 (Events Register) I have a step with a conditional. In my case, I just use a show “toast” indicator message, that says there is an error.

The conditional on the action to show the toast would be something like:
“When result of step 1 (events-register)'s returned_an_error = yes”

(Make sure you have told Bubble to treat that field as a boolean when you set up your api call).

I then put in the toast message the error status message so a user can see what happened too.

Alright, i really appreciate your reply @ratsoundsystems

I’m currently fix this with the following method, I bring a id attribute to text field in the editor and later in workflow do this.
Screenshot_59

And this is the result
Screenshot_60

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