Response message
Options
![Valentin R](https://us.v-cdn.net/6037124/user_avatars/4304535.jpg)
Valentin R
Member ✭
Hello! I have an endpoint which adds/updates a contact in db (endpoint) + sends an email if some conditions are met (custom function).
"Email sending" custom function is a part of the endpoint's flow.
It has a precondition that determines if an email must go out or not.
I want the endpoint to respond with "Ok" no matter how the custom function worked. Right now every time the precondition on that custom function is not met, the response is overridden with "Precondition failed". How to avoid it?
Thanks.
"Email sending" custom function is a part of the endpoint's flow.
It has a precondition that determines if an email must go out or not.
I want the endpoint to respond with "Ok" no matter how the custom function worked. Right now every time the precondition on that custom function is not met, the response is overridden with "Precondition failed". How to avoid it?
Thanks.
Comments
-
I would use a Conditional (IF.. THEN.. ELSE..) function in lieu of the precondition. This way you can have your response always be "Ok" as the precondition will trigger an error when it is not met.
-
thanks Michael. Will try that.
And thanks for all the videos, I've seen a bunch so far and they are really helpful. -
Works well!
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