Help with API Response Handling in Voiceflow
I'm working on a project in Voiceflow where I use an API to check the order status from Airtable. My current flow tries to access the order status using the path response.records[0].fields.Status, but I'm facing issues when incorrect or nonexistent order numbers are entered. In these cases, I would like the chatbot to notify the user that the order number was not found instead of showing an error or inappropriate response.
Does anyone have experience with handling this type of situation in Voiceflow? How can I effectively check if the records array is empty before trying to access the fields, and what practices would you recommend for handling errors and providing useful feedback to the user?
Any guidance or code examples would be greatly appreciated. Thanks in advance!
PD: When running the chat, if I enter a correct order number followed by an incorrect order number, it repeats the same response as for the correct order number


