Comments (5)
Hi @rliberoff,
We were able to reproduce the issue by forcing an error in the OnMessageActivityAsync method and another one in the OnTurnError.
We'll analyze how the correct behavior should be.
from botbuilder-dotnet.
Maybe the question is – if there is no bug – how to correctly handle exceptions in the CloudAdapter
when using the ShowTypingMiddleware
.
Please advice.
Thank you.
from botbuilder-dotnet.
Menawhile we created a custom middleware. It is actually a copy of yours, but with a slightly different FinishTypingTaskAsync
method, which is where we found the issue occurs.
private async Task FinishTypingTaskAsync(ITurnContext turnContext)
{
if (string.IsNullOrEmpty(turnContext?.Activity?.Conversation?.Id) && !tasks.ContainsKey(turnContext.Activity.Conversation.Id))
{
return;
}
// Cancel the typing loop.
tasks.TryGetValue(turnContext.Activity.Conversation.Id, out var item);
var (typingTask, cts) = item;
cts?.Cancel();
cts?.Dispose();
if (typingTask != null)
{
if (typingTask.Exception == null)
{
await typingTask.ConfigureAwait(false);
}
typingTask.Dispose();
}
tasks.TryRemove(turnContext.Activity.Conversation.Id, out _);
}
Please notice the if (typingTask.Exception == null)
which detects if there is an exception in the (previous) task.
Thank you.
from botbuilder-dotnet.
Hi @JhontSouth!
Thank you. If there’s anything more I can assist you with, please don’t hesitate to reach out.
from botbuilder-dotnet.
Merged in #6772. Available next release.
from botbuilder-dotnet.
Related Issues (20)
- Waterfall steps are being called out of order
- Update to version 3 of the Azure Cosmos DB .NET SDK
- Posting back response to bot - Access has been blocked by Conditional Access policies. The access policy does not allow token issuance. HOT 4
- And the Useless Constructor Overload Award goes to... HOT 1
- Token Service Gives a 500 Service Error When Exchanging Token
- Wrong results when using OAuthPrompt from group or channel
- Bot returns an error when using Regex validation in adaptive cards HOT 6
- Migrate to System.Text.Json - remove newtonsoft HOT 1
- CosmosDBKeyEscape.TruncateKeyIfNeeded return different value after compiled
- The Bot Framework SDK for C# does not return a value in the Activity.LocalTimezone property when using Copilot in Microsoft Teams HOT 2
- File Attachment gives error in private endpoint enabled bot
- Adaptive card sent by bot builder framework only shows "Sent a card" as the message, in iPhone
- Teams V2 messaging extension started from commandbox has no context (URL placeholder are not replaced with values)
- When using skills with user assigned managed identity , the msi endpoint fails with a 500 HOT 22
- Provide Logging around config issues with auth HOT 3
- Convert to new CodeQL suppression syntax
- Add SingleTenant/MSI Issuer to ValidTokenIssuers for Skill samples
- How to migrate from Bot SDK 4.3 to Azure Bot Service HOT 3
- Add M365 channel id's to Microsoft.Bot.Connector.Channels.
- AdaptiveExpressions: AOT and System.Text.Json
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botbuilder-dotnet.