Ref:
|
tcs.TrySetException(new TimeoutException($"SendAndWaitAsync timed out after {effectiveTimeout}"))); |
|
return await tcs.Task; |
If the cancellation token passed to SendAndWaitAsync is cancelled externally it always throws a TimeoutException - instead of a OperationCanceledException.
This make it hard to tell to the user what's the real issue - if it's just a user cancellation or if the action indeed timed out.
Ref:
copilot-sdk/dotnet/src/Session.cs
Lines 204 to 205 in c263dfc
If the cancellation token passed to SendAndWaitAsync is cancelled externally it always throws a
TimeoutException- instead of aOperationCanceledException.This make it hard to tell to the user what's the real issue - if it's just a user cancellation or if the action indeed timed out.