-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
Describe the bug
If you are application is misconfigured, and a null hub name is provided then the following exception is thrown.
System.InvalidOperationException: 'A suitable constructor for type 'Microsoft.Azure.SignalR.Management.RestHealthCheckService' could not be located. Ensure the type is concrete and all parameters of a public constructor are either registered as services or passed as arguments. Also ensure no extraneous arguments are provided.'
I found the error to be a misleading.
To Reproduce
Attempt to create a hub context where the hub name is null
using var serviceManager = new ServiceManagerBuilder()
.WithConfiguration(_configuration)
//or .WithOptions(o=>o.ConnectionString = _configuration["Azure:SignalR:ConnectionString"]
.WithLoggerFactory(_loggerFactory)
.BuildServiceManager();
var hubContext = await serviceManager.CreateHubContextAsync(null, cancellationToken);
Exceptions (if any)
System.InvalidOperationException: 'A suitable constructor for type 'Microsoft.Azure.SignalR.Management.RestHealthCheckService' could not be located. Ensure the type is concrete and all parameters of a public constructor are either registered as services or passed as arguments. Also ensure no extraneous arguments are provided.'
Metadata
Metadata
Assignees
Labels
No labels