When making an external API call, the bot throws a TaskCanceledException if the call takes longer than 24 seconds. Previous TeamsActivityHandler bots did not have this limitation--they would successfully process such requests.
The bot waits until the call is complete and then throws an exception. For example, if the call takes 30 seconds, the bot will wait 30 seconds and then throw the exception. If the call takes 60 seconds, the bot will wait 60 seconds and then throw the exception.
I've simulated this behaviour by creating a simple bot based on the Echo bot sample. I changed the Activity handler to the code below and verified the behavior by modifying the delay value.
1. Clone Echo bot sample
2. Change Activity Handler to sample in description
3. Set delay to 10
4. Send bot a message. Both start and end message will appear
5. Change the delay to 60
6. Send bot a message. Start message will appear and 60 seconds later an error message will appear (TaskCanceledException thrown)
Language
C#
Version
latest
Description
When making an external API call, the bot throws a TaskCanceledException if the call takes longer than 24 seconds. Previous
TeamsActivityHandler
bots did not have this limitation--they would successfully process such requests.The bot waits until the call is complete and then throws an exception. For example, if the call takes 30 seconds, the bot will wait 30 seconds and then throw the exception. If the call takes 60 seconds, the bot will wait 60 seconds and then throw the exception.
I've simulated this behaviour by creating a simple bot based on the Echo bot sample. I changed the Activity handler to the code below and verified the behavior by modifying the delay value.
Reproduction Steps