[Help Needed] To handle Proper API response


Want to ask that, I’m making API calls using API connector. below is the screenshot where i’m getting proper response for API . I have checked the include error and response headers for API. So i’m getting error_statsu code which i’m using to set the custom state in condition for workflow action.

API is running properly and also getting the result . Kindly check below screenshot where i have the condition that if error_status_code is 200 but, it is empty in debugger.

when i’m trying to debug it , it is always showing empty.
Is this error object added by bubble end?
Any suggestions on how to handle this?

Hi @pratima.dudhewar,

Only when an error occurs the error status code will not be empty, so it might be best for you to check for “returned_an_error” is yes/no in your workflow action.

Here is the Bubble Docs Reference for this.

Thank for your quick reply.

Yes… I just figured out this only…

But as i’m having two API calls in same workflow actions based on page width. So for me both API’s return error_code is “no”. But i want either of the condition to get fulfiiled.

I might have an issue understanding what you’d like to achieve here.

Let me try, so both calls feed the same states and you’d want the 1st call to fill up the states and not let the 2nd call overwrite them in the next step if the 2nd call is also successful?

Btw which API are you using?


Heyy, i was just debugging it. Earlier i thought both the calls are updating the state… But not actually i have conditions on API calls as well. So curretly it looks like it is working fine for me.
Thank you for looking into it.
If you dont mind can i ask another question?

@pratima.dudhewar Great to hear it works! Sure shoot!

Hey @jukoen
I have text field in API response. which has 7 digits for Mon-Sun
for ex. 1010110 for this text(which coming from API)
i want to show Mon,Wed,Fri,Sat. Like this.

**Basically i want to show if first digit is “1” then in text i want to show “Mon”
when digit is 0 then that day is not shown.

Well i was trying to achieve this using javascript which will parse the text character by character. BUt i think that is lil tricky.
Is there any other way to achieve this?

See an example here:
Editor link

Thank you @jukoen . I really appreciate your efforts.
Looks like, it the exact what i wanted. But ,as i’m not able to test it thoroughly will look into it.
Will let you know. Well there are 1-2 issues which i’m currently facing while buidling my first webapp on bubble platform. Would you like to help me with this?