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

Not every request has a session. Every request has a context #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

calevans
Copy link

I have only been working with Alexa for two weeks now so I may be wrong. However, I noticed in my logging that I was getting a lot of invalid app id errors. When I dug into it I found that not all requests coming from Amazon have a session - e.g. AudioPlayer.PlaybackStarted - but all requests have context. Once I changed the RequestValidator to check that instead, all errors stopped.

Thanks for the great library.

Cheers!
=C=

@nomisoft
Copy link
Owner

Hi Cal,

Thanks, you're quite right. I hadn't used the AudioPlayer requests but just read in the documentation about them not having a 'session' object. Some of the other requests I've used don't have the 'context' though so what I've done instead is put a getApplicationId() function in the AlexaRequest class which will return the id from session or context wherever its found.

Could you confirm that's work for you?

@calevans
Copy link
Author

calevans commented Mar 1, 2017 via email

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.

2 participants