You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Expected Behavior
I expect the returned value of getSlot to matche its typescript definition.
Current Behavior
The function definition declares Slot as a return type. The actual implementation of getSlot allows reutrn types null (if there are no slots) or undefined (if there are slot but not the one passed as argument).
.... causes the following error when the slotName is not present in the request:
TypeError: Cannot read property 'resolutions' of undefined
at Object.getResolvedSlotValue (/var/task/src/helper/request.ts:6:12)
... next lines not relevant
Declare an intent with 2 slots (e.g. slotOne and slotTwo), and an utterance that fills only one (e.g. slotOne)
Use above function in your skill handler to extract the other utterance (e.g. slotTwo)
Invoke the skill intent with your utterance
Context
This helper extracts slot values from custom slot types, and then extract the ID from the value. I often rely on typing to failsafe my code. Hence, some errors can slip through when the types do not match the implementation.
Is this issue/feature-request still relevant?
We are working on prioritization of relevant issues and cleanup of rest. If we don’t hear back in 2 weeks, we will assume that the issue is not relevant and we will close it.
I'm submitting a...
Expected Behavior
I expect the returned value of
getSlot
to matche its typescript definition.Current Behavior
The function definition declares
Slot
as a return type. The actual implementation ofgetSlot
allows reutrn typesnull
(if there are no slots) orundefined
(if there are slot but not the one passed as argument).The following code:
.... causes the following error when the
slotName
is not present in the request:Possible Solution
See #702
Steps to Reproduce (for bugs)
slotOne
andslotTwo
), and an utterance that fills only one (e.g.slotOne
)slotTwo
)Context
This helper extracts slot values from custom slot types, and then extract the ID from the value. I often rely on typing to failsafe my code. Hence, some errors can slip through when the types do not match the implementation.
Your Environment
Node.js and NPM Info
The text was updated successfully, but these errors were encountered: