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
I'm calling "Microsoft.Azure.SignalR.Management.ClientManager.ConnectionExistsAsync" for non-existing connection, while talking to emulator. Method call throws exception, saying that emulator responded "404", but it seems like expected behaviour, so I guess method call shouldn't throw exception. Debugging deeply, I see that response doesn't contain header "x-ms-error-code", which management sdk is expecting, so it might be an emulator issue though.
Tested with azure cloud SignalR, works fine, not throwing exception, so problem is probably in the emulator.
To Reproduce
Run emulator
Create CLI app with "Microsoft.Azure.SignalR.Management" referenced
Microsoft.Azure.SignalR.Common.AzureSignalRInaccessibleEndpointException: Unable to access SignalR service. Response status code does not indicate success: 404 (Not Found) Please make sure the endpoint or DNS setting is correct. Request Uri: http://localhost:8888/api/hubs/signalrhub/connections/xxxxxxxxxxxxxxxxxxxxxx?api-version=2022-06-01
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found)
--- End of inner exception stack trace ---
at Microsoft.Azure.SignalR.RestClient.ThrowExceptionOnResponseFailureAsync(HttpResponseMessage response) in ...\azure-signalr-1.24.0\src\Microsoft.Azure.SignalR.Common\Utilities\RestClient.cs:line 106
at Microsoft.Azure.SignalR.RestClient.SendAsyncCore(String httpClientName, RestApiEndpoint api, HttpMethod httpMethod, String methodName, Object[] args, Func`2 handleExpectedResponseAsync, CancellationToken cancellationToken) in ...\azure-signalr-1.24.0\src\Microsoft.Azure.SignalR.Common\Utilities\RestClient.cs:line 138
at Microsoft.Azure.SignalR.Management.RestHubLifetimeManager`1.ConnectionExistsAsync(String connectionId, CancellationToken cancellationToken) in ...\azure-signalr-1.24.0\src\Microsoft.Azure.SignalR.Management\RestHubLifetimeManager.cs:line 273
...
Further technical details
SignalR SDK version: 1.24.0
Microsoft.AspNetCore.SignalR: 1.0.0
Microsoft.AspNet.SignalR.Client: 2.4.3
The text was updated successfully, but these errors were encountered:
vyacheslav-sozap
changed the title
ClientManager.ConnectionExistsAsync throws exception on expected 404 response
ClientManager.ConnectionExistsAsync throws exception on expected 404 response from emulator
Feb 14, 2024
Describe the bug
I'm calling "Microsoft.Azure.SignalR.Management.ClientManager.ConnectionExistsAsync" for non-existing connection, while talking to emulator. Method call throws exception, saying that emulator responded "404", but it seems like expected behaviour, so I guess method call shouldn't throw exception. Debugging deeply, I see that response doesn't contain header "x-ms-error-code", which management sdk is expecting, so it might be an emulator issue though.
Tested with azure cloud SignalR, works fine, not throwing exception, so problem is probably in the emulator.
To Reproduce
hubContext.ClientManager.ConnectionExistsAsync("non_existing_connection");
Exceptions
Further technical details
The text was updated successfully, but these errors were encountered: