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

TypeError: Cannot read property 'id' of undefined #9

Open
fedealconada opened this issue Aug 15, 2017 · 1 comment
Open

TypeError: Cannot read property 'id' of undefined #9

fedealconada opened this issue Aug 15, 2017 · 1 comment

Comments

@fedealconada
Copy link
Contributor

I noticed that when using api.ai module AND webhooks module at the same time, this error appears:

TypeError: Cannot read property 'id' of undefined at incomingMiddleware (/Users/me/project/node_modules/botpress-api.ai/bin/webpack:/src/index.js:42:21) at exec (/Users/me/project/node_modules/mware/index.js:50:23) at next (/Users/me/project/node_modules/mware/index.js:60:9) at processIncoming (/Users/fedealconada/Documents/Desarrollo/Sirius ...

@fedealconada
Copy link
Contributor Author

fedealconada commented Aug 15, 2017

This is because api.ai incoming middleware is catching the webhook request but no event.user is defined. My proposed solution is to check if the user exists and if not, just skip it and continue (next()).

#10

@slvnperron @DanyFS

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

No branches or pull requests

1 participant