Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for a fallback handler #393

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pariola
Copy link

@pariola pariola commented Aug 5, 2019

I thought its better to give developers control over the message they want to return when a user's request doesn't match

Copy link
Collaborator

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs tests, docs, etc.

index.js Outdated
@@ -413,14 +413,16 @@ alexa.session = function(session) {

alexa.router = function(app, request, response, request_json) {
this.intent = function(intent) {
request.intent = intent;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This modifies the incoming request, I don't think that's a good idea, at the very least it's an anti-pattern to be modifying something coming from the outside.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, i understand and already updated the code as that field is still accessible from the raw data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants