Handling HTTP Request Errors – Cognigy.AI Help Center
Handling HTTP Request Errors
Cognigy Support
December 27, 2020
Challenge
You want to access an API and handle errors returned from it properly.
Solution
Cognigy.AI will return the full response from the API within the Input or Context objects, depending on what you configured. The default is
input.httprequest
Within this object you will see the exact response from your API, including all error information. Example:
"httprequest": {
"error": {
"code": 500,
"description": "Internal Server Error"
},
"statusCode": 500
}
You could now branch your Flow depending on the result, e.g. input.httprequest.error
QnA
- Exchanging data with Microsoft SharePoint
- Exchanging data with Microsoft SQL Server (MSSQL)
- Using CognigyScript in Twilio Twiml XML
- How can I adjust the style of the Webchat Widget
- Accessing Information about the Cognigy.AI API
- Trigger Microsoft Power Automate Flows
- Handling HTTP Request Errors
- How to add a member to your virtual agent
- Add a new user to your Cognigy.AI organization
- Identifying a Unique Endpoint via analytics