IBM / watson-online-store

Learn how to use Watson Assistant and Watson Discovery. This application demonstrates a simple abstraction of a chatbot interacting with a Cloudant NoSQL database, using a Slack UI.
https://developer.ibm.com/patterns/create-cognitive-retail-chatbot/
155 stars 222 forks source link

Fix Issue with bad input. #178

Closed scottdangelo closed 5 years ago

scottdangelo commented 5 years ago

We were getting a stacktrace due to bad input containing newlines, which causes a Traceback. One issue fixed is that we no longer need to make a "dummy" call to initialize the Watson Assistant context. Doing this moved us forward in the Assistant state machine, causing errors in how we handled the context. Another issue is that the app was considering text from the bot in Slack (which came from Watson Assistant) as user input. This also moved us forward in the dialog, and resulted in sending the newlines that caused the crash.

Closes: #176