Closed dgreene1 closed 5 years ago
Hi @dgreene1, I tried reproducing the issue but in my case, the filter works correctly. alexaSDK2Interceptor.zip is the sample I used for my tests. After doing an npm install
you can run node test/index.test.js
and it should print in the console the values affected by the filter.
Can you verify if that scenario is what you have reported?, or if I skipped something you did?
Thanks @jperata. I’ll try to reproduce my issue again. At the moment I cannot so I will close this issue. If it reoccurs for some reason, I will reopen the issue. Thank you for investigating.
Description:
the
filter
method doesn't work with.addRequestInterceptors(theRequestInterceptor)
as the replaced value of session is not set. Filter works fine for setting values that will appear in each intent handler (as recommended by the VirtualAlexa readme) but if I had to guess I would say that the "filtered value" is only passed through to the intent handlers and not to the interceptor.Environment:
Steps To Reproduce
Steps to reproduce the behavior:
handlerInput.requestEnvelope.session.user.accessToken
to a value by using filter.addRequestInterceptors
by passing in an object of typeAlexa.RequestInterceptor
as defined inask-sdk
Expected behavior
The value set in
filter
will be the value that gets sent into the interceptorActual behavior
The value set in
filter
is undefined in the interceptor's process functionCode example
The interceptor
The code that uses it:
The test code: