How to avoid “Sorry, my bot code is having an issue” in Microsoft Bot Framework

前端 未结 3 845
我在风中等你
我在风中等你 2020-12-15 05:25

I have a bot that runs on Azure + Bot Framework + LUIS (via LuisDialog).

If the user happens to send two messages in a quick succession (before the bot has a chance

3条回答
  •  粉色の甜心
    2020-12-15 06:04

    The message is sent to the user in PostUnhandledExceptionToUserTask only because the exception has escaped the root dialog A. You can avoid this situation by preventing unhandled exceptions from escaping the root dialog A.

    One option is to add a different root dialog B that simply calls your dialog A and then simply ignores the IAwaitable result that is passed to the ResumeAfter callback.

    Chain.DefaultIfException provides an implementation of dialog B.

提交回复
热议问题