fix: catch the throw error message from the luis file check function #2557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The luis check function before publishing will check empty file and referred lu files. The error message should show if the check fail.
Do some refactor about the publish luis and load bot logic:
The botStatus ={
connected = 'connected',
unConnected = 'unConnected',
publishing = 'publishing',
published = 'published',
reloading = 'loading',
pending = 'pending',
failed = 'failed',
}
If the project is new the status = unConnected;
if there are some errors when starting the bot status = failed, the callout will show the error message, the the status will be set pedding.
if status = publishing or reloading, will show the loading component.
if publish luis succeed the status will be set published and then will call the loadBot function.
if finish the flow, the status will be set connected.
Task Item
refs #2555
Screenshots