How to best handle workflows where the requested data is not found?
Just like Bubble would let me catch “wrong password”, I was expecting that I could throw an error inside any action - like when a “Search for…” comes back empty.
The only way I can solve this today is:
- Run the expected action, which includes a search for data, adding an “Only when” exception running the “Search for…” query to make sure it returns a record.
- Then, run another step which does some error hjandling, again running the same query as before in it’s “only when…”, but this time looking for an empty search result.
To me, this looks extremely resource inefficient (I run three queries on the db - see circled images ) and generally not so neat workflow-wise. To me, the ultimate way to do it would be to:
- Run the initial search query.
- Let the “only when…” referring to the output of the first query not being empty.
- Have a new editor “else” option next to “only when…” that could throw an error.
GIven that this kind of if/then/else is a core concept of programming, maybe there is a better way to handle it?