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.

asked 2 years ago298 views
1 Answer
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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions