Error on creating intent after createbotlocale

0

I am getting this error when I try to create bot locale and then intent after that, how can I handle this in java please ?

Create operation can not be performed on Intent when BotLocale is in Creating state. Retry your request after the BotLocale is created

I understand what it means but not sure how to handle this in the code. Can you please help ?

I am using java sdk lexv2.

已提问 2 年前332 查看次数
1 回答
0

A bot locale is not immediately available after successfully invoking the CreateBotLocale API. The "botLocaleStatus" attribute in the response of CreateBotLocale and DescribeBotLocale will tell you the current status of the bot locale. You need to verify that the bot locale is in a valid state (NOT_BUILT) after invoking CreateBotLocale to successfully create intents in that bot locale. In the Java SDK, you can do this in two ways:

  1. Create a loop to poll for the status of the bot locale using DescribeBotLocale API
  2. Use a SDK waiter to poll that the bot locale is created and available. More info on SDK waiters
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则