on 05-09-2020 3:28 PM
Hi,
I am consuming a api service in my chatBot. When my api service executed successfully am giving a message and its working perfect(case1.png). But whenever my api service fails or gives an error(case2.png) i want to show another message, so how can i handle the error when my api service fails?
Note:Please find the screenshots case1.png and case2.png so that you will get an idea of my question.
Regards
nithin
Hi Nithin,
you can use conditions to execute actions only when the API returned an error, e.g.
_api_service_response.default.status_code is not 200
With this approach, you'll have one message group for executing the API call, one for handling the error case and one message group with the actions for the success case.
Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nithin,
Capture your response variable in a memory field and add a block with check if memory.yourvariable is not something (I.e blank) display your custom message.
Thanks
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.