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
878 stars 484 forks source link

Add counter to onError trigger to break possible loops #6776

Open ceciliaavila opened 7 months ago

ceciliaavila commented 7 months ago

minor

Description

This PR adds a counter in the loop that executes the onError trigger to detect and break possible infinite loops when there's an error inside the onError handler. It also includes a new property to the onError, to make the limit of executions configurable for the users (default value: 10).

Specific Changes

Testing

These images show the scenarios we tested with the new implementation. image

coveralls commented 7 months ago

Pull Request Test Coverage Report for Build 387980

Details


Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder.Dialogs/Memory/TurnPath.cs 1 0.0%
/libraries/Microsoft.Bot.Streaming/Payloads/StreamManager.cs 1 90.0%
/libraries/Microsoft.Bot.Builder.Dialogs/DialogExtensions.cs 4 95.29%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build 387708: 0.005%
Covered Lines: 26198
Relevant Lines: 33511

💛 - Coveralls
BruceHaley commented 7 months ago

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