Skip to content

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

@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

Labels

Area: SDKGeneral SDK issues that don't clearly map to other areas (e.g.: helper methods)P1Painful if we don't fix, won't block releasingSize: SThe issue is simple and well understood, it will take a day or less to complete

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions