microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
872 stars 479 forks source link

Add error detection when EmitEventAsync fails in internal RunAsync #6708

Closed sw-joelmut closed 10 months ago

sw-joelmut commented 10 months ago

minor

Description

This PR adds error detection when the internal RunAsync method fails using AdaptiveDialogs, otherwise, the original Exception gets lost.

e.g.: original exception containing circular reference errors, it's captured by the dialogContext.EmitEventAsync to send the error as a message, then, it proceeds to fail, and the error thrown in the stack is the circular reference error, and the original exception gets lost.

Specific Changes

Testing

The following image shows the pipeline working and how the error is thrown. image image

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 378002


Files with Coverage Reduction New Missed Lines %
/libraries/AdaptiveExpressions/BuiltinFunctions/GetNextViableTime.cs 1 90.91%
/libraries/AdaptiveExpressions/BuiltinFunctions/GetPreviousViableTime.cs 1 90.91%
/libraries/Microsoft.Bot.Builder.Dialogs/DialogExtensions.cs 4 94.74%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 377857: 0.0%
Covered Lines: 26127
Relevant Lines: 33309

💛 - Coveralls
BruceHaley commented 10 months ago

:heavy_check_mark: No Binary Compatibility issues for Microsoft.Bot.Builder.Dialogs.dll