How do I account for empty/null values when doing a get request?
I'm using Bubble as my front end, but whenever I make a call and there is an empty value or null value, bubble throws an error. I am using the xano plugin along with the api connector, (I've attached screenshots below of how the get request is setup)
This is one of the errors I got
Has anyone else faced the same issue and know the best solution? For now I am thinking of manipulating the response so that bubble wont throw an error.
If the field is expecting a number and it is empty then that is an issue (manipulate to 0)
If it is expecting a text and it is empty (manipulate to "" )
if it is expecting an array and it is empty (manipulate to an empty array) an example here would be the seller_with_offer [0] in the run and debug window
Same process for null values
How would I go about this?
Answers
-
Hi @Abhishek Joseph - the error sounds like your JSON might be formatted correctly. I don't fully understand why Bubble wouldn't accept empty values. Although I'm not as versed in the community Bubble plugin. You might also want to check in on the plugin thread.
You can always update values with conditional functions and an update variable or in-line with a set_conditional filter.
-
Thank you
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback