1 write to Error
Microsoft.AspNetCore.SignalR.Common (1)
Protocol\CloseMessage.cs (1)
49Error = error;
28 references to Error
Microsoft.AspNetCore.Components.Server (2)
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (2)
560if (string.IsNullOrEmpty(message.Error)) 566writer.Write(message.Error);
Microsoft.AspNetCore.Components.Server.Tests (2)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestHubMessageEqualityComparer.cs (2)
41return string.Equals(closeMessage.Error, ((CloseMessage)y).Error);
Microsoft.AspNetCore.SignalR.Client.Core (4)
HubConnection.cs (4)
1329if (string.IsNullOrEmpty(close.Error)) 1335Log.ReceivedCloseWithError(_logger, close.Error); 1654if (closeMessage.Error != null) 1656connectionState.CloseException = new HubException($"The server closed the connection with the following error: {closeMessage.Error}");
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Internal\Protocol\TestHubMessageEqualityComparer.cs (2)
41return string.Equals(closeMessage.Error, ((CloseMessage)y).Error);
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionHandler.cs (2)
209if (connection.CloseMessage.Error is not null) 212disconnectException = new HubException(connection.CloseMessage.Error);
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
662if (message.Error != null) 664writer.WriteString(ErrorPropertyNameBytes, message.Error);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Protocol\MessagePackHubProtocolWorker.cs (2)
560if (string.IsNullOrEmpty(message.Error)) 566writer.Write(message.Error);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Protocol\NewtonsoftJsonHubProtocol.cs (2)
653if (message.Error != null) 656writer.WriteValue(message.Error);
Microsoft.AspNetCore.SignalR.Tests (10)
HubConnectionHandlerTests.ClientResult.cs (2)
92Assert.Equal("Connection closed with an error. InvalidOperationException: Client results inside OnConnectedAsync Hub methods are not allowed.", closeMessage.Error); 120Assert.Null(closeMessage.Error);
HubConnectionHandlerTests.cs (8)
1542Assert.Equal("Connection closed with an error.", close.Error); 3123Assert.Null(closeMessage.Error); 3159Assert.Equal("Connection closed with an error. InvalidOperationException: Hub OnConnected failed.", closeMessage.Error); 3163Assert.Equal("Connection closed with an error.", closeMessage.Error); 3576Assert.Equal("Connection closed with an error. InvalidDataException: Connection terminated while reading a message.", closeMessage.Error); 5126Assert.Null(message.Error); 5152Assert.Null(message.Error); 5324Assert.Null(message.Error);