you can safely ignore TaskCancelledException

Quote

As a general rule, I recommend you completely ignore TaskCanceledException. Some APIs just raise OperationCanceledException, even if they deal with cancelled tasks. And since TaskCanceledException derives from OperationCanceledException, your cancellation exception handler code can just use OperationCanceledException, ignore ``TaskCanceledException completely, and it will work everywhere.

[1]


  1. Cancellation, Part 3- Detecting Cancellation ↩︎