You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
When authorization fails in the JS client the error we get is "Error". Super useful 😄 .
We should detect when authentication fails and throw a useful error like "Authentication failed". The easiest way to detect this is if the negotiate request returns 401. Also, the transports should individually try to detect similar failures and throw the same error, in case authentication fails mid-connection.
Might need something similar in the .NET Client.
The text was updated successfully, but these errors were encountered:
[2018-08-16T20:31:17.812Z] Error: Failed to complete negotiation with the server: Error: Unauthorized
[2018-08-16T20:31:17.813Z] Error: Failed to start the connection: Error: Unauthorized
Current behavior in .NET Client:
Connecting to http://localhost:54543/broadcast
warn: Microsoft.AspNetCore.Http.Connections.Client.Internal.LoggingHttpMessageHandler[2]
Unsuccessful HTTP response 401 return from POST 'http://localhost:54543/broadcast/negotiate'.
fail: Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[10]
Failed to start connection. Error getting negotiation response from 'http://localhost:54543/broadcast'.
System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger) in C:\Github\SignalR\src\Microsoft.AspNetCore.Http.Connections.Client\HttpConnection.cs:line 425
Both mention not being authorized. Do we want even more? Haven't tried out in the middle of a connection yet. That's next.
ServerSentEvents - Can no longer send, but can still receive forever (TS only, .NET Closes connection)
LongPolling - Can no longer send, can receive one more message or until current poll times out (TS only, .NET Closes connection)
We might want to file issues for the SSE and LongPolling behaviors, but I think this issue can be closed as the logs do say that the connection/request was Unauthorized
When authorization fails in the JS client the error we get is "Error". Super useful 😄 .
We should detect when authentication fails and throw a useful error like "Authentication failed". The easiest way to detect this is if the negotiate request returns
401
. Also, the transports should individually try to detect similar failures and throw the same error, in case authentication fails mid-connection.Might need something similar in the .NET Client.
The text was updated successfully, but these errors were encountered: