diff --git a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs index f52e5ba32357..956b89b8b53e 100644 --- a/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs +++ b/src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs @@ -2419,7 +2419,7 @@ IReadOnlyList IInvocationBinder.GetParameterTypes(string methodName) if (!_hubConnection._handlers.TryGetValue(methodName, out var invocationHandlerList)) { Log.MissingHandler(_logger, methodName); - return Type.EmptyTypes; + throw new KeyNotFoundException($"Method with name '{methodName}' does not exist."); } // We use the parameter types of the first handler