-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers
Milestone
Description
Is there an existing issue for this?
This somewhat feeds into #44383 but that's a more general tracking item.
Describe the bug
I had a line of code using SignalR like this:
await foreach (var response in conn.StreamAsync<ChatResponse>("Chat", req, cancellationToken))
The surprise I ran into was the server sent me a different JSON payload back, and the JSON object couldn't be deserialized. That's fine, but this serialization exception got converted to a StreamBindingFailureMessage with the exception stored. The surprise however is that doesn't get reported anywhere -- we hit the default case at
throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); |
Expected Behavior
The exception is propagated somewhere to make this debuggable.
.NET Version
8.0.6 of the SignalR library
IEvangelist
Metadata
Metadata
Assignees
Labels
area-signalrIncludes: SignalR clients and serversIncludes: SignalR clients and servers