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

Composite Slots throw Undefined Exception during tests #807

Open
birchard opened this issue Sep 25, 2024 · 0 comments
Open

Composite Slots throw Undefined Exception during tests #807

birchard opened this issue Sep 25, 2024 · 0 comments

Comments

@birchard
Copy link

birchard commented Sep 25, 2024

Describe the bug
I have been working on a Lex V2 project that is using Composite Slots for a few Intents and we found that an undefined exception was interrupting the tests. We found that unfilled subslots were causing the exception when handling the response.

Regular slots get filtered out correctly as they are flat. For example:

"slots": {
  "optInConfirmation": null,
}  

Composite slots have nested subslots, so they are not filtered out:

"slots": {
  "generalInquiry": {
    "subSlots": {
      "optType": null,
      "optQuestion": null
    },
    "shape": "composite",
    "value": {
      "resolvedValues": []
    }
  }
}

To Reproduce
Create a composite slot for an intent and test

Expected behavior
The behavior should be the same as for simple slots

We have been able to correct the behavior by introducing Option chaining. I have opened a PR with our suggested fix. codeforequity-at/botium-connector-lex#22

Screenshots and Log files
If applicable, add screenshots and/or logfiles to help explain your problem.

Botium Flavour:

  • Botium Box ?
  • Botium CLI ?
  • Botium Bindings ?

Botium Version

  • Is there an exact version where this bug is happening ?

Additional context
Add any other context about the problem here.

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