From bf981b34cdda5b4696b6f3fae89cc3881f8df5e0 Mon Sep 17 00:00:00 2001 From: xingsy97 <87063252+xingsy97@users.noreply.github.com> Date: Wed, 18 Oct 2023 12:49:22 +0800 Subject: [PATCH] update exception type for client invocation --- .../ClientInvocation/CallerClientResultsManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Azure.SignalR/ClientInvocation/CallerClientResultsManager.cs b/src/Microsoft.Azure.SignalR/ClientInvocation/CallerClientResultsManager.cs index 33dfc7fd1..330dd76e1 100644 --- a/src/Microsoft.Azure.SignalR/ClientInvocation/CallerClientResultsManager.cs +++ b/src/Microsoft.Azure.SignalR/ClientInvocation/CallerClientResultsManager.cs @@ -51,7 +51,8 @@ public Task AddInvocation(string connectionId, string invocationId, Cancel } else { - tcs.TrySetException(new Exception(completionMessage.Error)); + // Follow https://github.com/dotnet/aspnetcore/blob/v8.0.0-rc.2.23480.2/src/SignalR/common/Shared/ClientResultsManager.cs#L30 + tcs.TrySetException(new HubException(completionMessage.Error)); } }) );