32 references to WithError
Microsoft.AspNetCore.Components.Server.Tests (3)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (3)
113message: CompletionMessage.WithError("xyz", error: "Error not found!"), 117message: AddHeaders(TestHeaders, CompletionMessage.WithError("xyz", error: "Error not found!")), 426new MessageSizeTestData("CompletionMessage_WithError", CompletionMessage.WithError("1", "error"), 13),
Microsoft.AspNetCore.SignalR.Client.Core (5)
HubConnection.cs (5)
998await SendHubMessage(connectionState, CompletionMessage.WithError(streamId, responseError), cancellationToken: default).ConfigureAwait(false); 1301await SendWithLock(connectionState, CompletionMessage.WithError(bindingFailure.InvocationId, "Client failed to parse argument(s)."), cancellationToken: default).ConfigureAwait(false); 1375await SendWithLock(connectionState, CompletionMessage.WithError(invocation.InvocationId!, "Client didn't provide a result."), cancellationToken: default).ConfigureAwait(false); 1425await SendWithLock(connectionState, CompletionMessage.WithError(invocation.InvocationId!, resultException.Message), cancellationToken: default).ConfigureAwait(false); 1434await SendWithLock(connectionState, CompletionMessage.WithError(invocation.InvocationId!, "Client didn't provide a result."), cancellationToken: default).ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Common.Tests (6)
Internal\Protocol\JsonHubProtocolTestsBase.cs (3)
67new JsonProtocolTestData("CompletionMessage_HasError", CompletionMessage.WithError("123", "Whoops!"), true, true, "{\"type\":3,\"invocationId\":\"123\",\"error\":\"Whoops!\"}"), 68new JsonProtocolTestData("CompletionMessage_HasErrorAndHeaders", AddHeaders(TestHeaders, CompletionMessage.WithError("123", "Whoops!")), true, true, "{\"type\":3," + SerializedHeaders + ",\"invocationId\":\"123\",\"error\":\"Whoops!\"}"), 374new MessageSizeTestData("CompletionMessage_WithError", CompletionMessage.WithError("1", "error"), 46),
Internal\Protocol\MessagePackHubProtocolTestBase.cs (3)
113message: CompletionMessage.WithError("xyz", error: "Error not found!"), 117message: AddHeaders(TestHeaders, CompletionMessage.WithError("xyz", error: "Error not found!")), 426new MessageSizeTestData("CompletionMessage_WithError", CompletionMessage.WithError("1", "error"), 13),
Microsoft.AspNetCore.SignalR.Core (8)
Internal\DefaultHubDispatcher.cs (6)
260var message = CompletionMessage.WithError(bindingFailureMessage.Id, errorString); 292return connection.WriteAsync(CompletionMessage.WithError( 602await connection.WriteAsync(CompletionMessage.WithError(invocationId, error)); 655await connection.WriteAsync(CompletionMessage.WithError(invocationId, errorMessage)); 699await connection.WriteAsync(CompletionMessage.WithError(hubMethodInvocationMessage.InvocationId, 709await connection.WriteAsync(CompletionMessage.WithError(hubMethodInvocationMessage.InvocationId!,
src\SignalR\common\Shared\ClientResultsManager.cs (2)
48invocationInfo.Complete(invocationInfo.Tcs, CompletionMessage.WithError(invocationId, "ID collision occurred when using client results. This is likely a bug in SignalR.")); 152_clientResultsManager.TryCompleteResult(_connectionId, CompletionMessage.WithError(_invocationId, "Invocation canceled by the server."));
Microsoft.AspNetCore.SignalR.Specification.Tests (4)
HubLifetimeManagerTestBase.cs (3)
221await manager.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithError(invocation.InvocationId, "Error from client")).DefaultTimeout(); 252manager.SetConnectionResultAsync(connection2.ConnectionId, CompletionMessage.WithError(invocation.InvocationId, "Error from client"))).DefaultTimeout(); 307await manager1.SetConnectionResultAsync(connection2.ConnectionId, CompletionMessage.WithError(invocation2.InvocationId, "error"));
ScaleoutHubLifetimeManagerTests.cs (1)
522await manager1.SetConnectionResultAsync(connection1.ConnectionId, CompletionMessage.WithError(invocation.InvocationId, "Error from client")).DefaultTimeout();
Microsoft.AspNetCore.SignalR.StackExchangeRedis (4)
RedisHubLifetimeManager.cs (2)
573invocationInfo?.Completion(null!, CompletionMessage.WithError(invocation.InvocationId, "Connection disconnected.")); 705hubMessage = CompletionMessage.WithError(((CompletionMessage)hubMessage!).InvocationId!, $"Client result wasn't deserializable to {invocationInfo?.Type.Name}.");
src\SignalR\common\Shared\ClientResultsManager.cs (2)
48invocationInfo.Complete(invocationInfo.Tcs, CompletionMessage.WithError(invocationId, "ID collision occurred when using client results. This is likely a bug in SignalR.")); 152_clientResultsManager.TryCompleteResult(_connectionId, CompletionMessage.WithError(_invocationId, "Invocation canceled by the server."));
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.ClientResult.cs (1)
63await client.SendHubMessageAsync(CompletionMessage.WithError(invocationMessage.InvocationId, "Client error")).DefaultTimeout();
HubConnectionHandlerTests.cs (1)
4001await client.SendHubMessageAsync(CompletionMessage.WithError("id", CustomErrorMessage)).DefaultTimeout();