Is there a way to customize the bot response or use the decision policy to route the response based on error status code received from an API call?
Example:
I have an action that submits an email. If the email is valid the API returns the required data if not valid it returns Status Code 400 error.
Status Code: 400
Response:
{
"code": "error",
"message": "Email not valid."
}
Email not found in the system means their account doesn’t exist and the bot should relay access request information.
I’ve attempted using the decision policy using if data is valid or not but with no luck.