Add exception handling
This commit is contained in:
parent
fee32d0bb7
commit
b8145154ba
@ -12,4 +12,11 @@ app.intent('AMAZON.YesIntent', handlers.handleYesIntent);
|
||||
app.intent('AMAZON.NoIntent', handlers.handleNoIntent);
|
||||
app.intent('AMAZON.CancelIntent', handlers.handleCancelIntent);
|
||||
|
||||
app.post = function(request, response, type, exception) {
|
||||
if (exception) {
|
||||
// Always turn an exception into a successful response
|
||||
response.clear().say('An error occured: ' + exception).send();
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = app;
|
||||
|
Loading…
x
Reference in New Issue
Block a user