Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

[PORT] Emit better error messages for all dialogs #676

Closed
@tomlm

Description

@tomlm

Port this change from botbuilder-dotnet/master branch:
microsoft/botbuilder-dotnet#4153

Fixes #3980

Description

Change dialogContext to capture exceptions and annotate exception with contextual information about where the exception happened.

Specific Changes

  • Add try/catch handlers to dialogContext methods to set Exception.Data["dialogContext'] with metadata about the context that the exception was thrown.

Testing

  • Updated existing OnError testing to test and validate for the dialog context data

Example exception metadata

{
   ...,
   "data": 
  {
       "DialogContext": 
       {
            "ActiveDialog": "SetProperty[=`foo`]",
            "Parent": "innerDialog",
           "Stack": [
               "SetProperty[=`foo`]",
               "innerDialog",
               "planningTest"
           ],
       }
}

Changed projects

  • Microsoft.Bot.Builder.Dialogs
  • Microsoft.Bot.Builder.Dialogs.Tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions