-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.
Description
Versions
4.8.0
Describe the bug
If LUIS is not configured correctly, calls to the service will sometimes return an .error result. This should be checked and properly raised, rather than assuming a result is returned: https://github.com/microsoft/botbuilder-js/blob/master/libraries/botbuilder-ai/src/luisRecognizerOptionsV3.ts#L62
const data = await fetch(uri, httpOptions)
const response = await data.json();
// SHOULD CHECK FOR response.error HERE
const result: RecognizerResult = {
text: utterance,
intents : getIntents(response.prediction),
entities : extractEntitiesAndMetadata(response.prediction),
sentiment: getSentiment(response.prediction),
luisResult: (this.predictionOptions.includeAPIResults ? response : null)
}To Reproduce
Steps to reproduce the behavior:
- Use CoreBot from samples
- Set the LuisAppId to an id that does not exist
- Run the bot, and trigger a LUIS call
- See confusing error:
TypeError: Cannot read property 'intents' of undefined
Expected behavior
A more descriptive error message should be shown. Preferably, the one LUIS returns.
Screenshots
If applicable, add screenshots to help explain your problem.

[bug]
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or an unintended behavior.Indicates an unexpected problem or an unintended behavior.