jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.68k stars 309 forks source link

Sending empty string to app.tell crashes server #41

Closed macasas closed 6 years ago

macasas commented 6 years ago

I realise I shouldn't be doing this, but

app.tell(''). i.e. sending an empty string by mistake

causes

Unhandled Rejection at: Promise Promise {

Error: Invalid output text: at Function.toSSML (/Users/dave/Documents/Projects/Jovo Projects/Recipes/node_modules/jovo-framework/lib/platforms/speechBuilder.js:130:19) at Jovo.tell (/Users/dave/Documents/Projects/Jovo Projects/Recipes/node_modules/jovo-framework/lib/jovo.js:950:27) Is there any way to gracefully catch this and not crash the server? or should this always be part of my code checking?
aswetlow commented 6 years ago

Hey @macasas! Thanks! It will be fixed tomorrow or on Saturday.

jankoenig commented 6 years ago

Fixed with this refactoring commit: https://github.com/jovotech/jovo-framework-nodejs/commit/7ecc048732d9863458fdc6fdba4c693092421db6