Azure / Azure/azure-functions-dotnet-worker

SignalR - HubException includes a stack trace

Open
#1,806 4 comments 0 reactions 1 assignee Claimed by @Y-Sindo View on GitHub
extensions: signal-r needs-investigation
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

Hi all,

according to [this documentation](https://learn.microsoft.com/en-us/aspnet/core/signalr/hubs?view=aspnetcore-5.0#handle-errors), the HubException should hide a stack trace from the client. But if I use the following code, my Javascript client can still see the whole stack trace.
I'm using Azure Service SignalR - serveless mode + Azure functions v4(isolated worker process). Is it possible to hide the stack trace? The library: Microsoft.Azure.Functions.Worker.Extensions.SignalRService version 1.7.0.
Thanks.
```C#
[Function(nameof("Subscribe"))]
[SignalROutput(HubName = "Hub", ConnectionStringSetting = "AzureSignalRConnectionString")]
public SignalRGroupAction Subscribe(
[SignalRTrigger("Hub", "messages", "Subscribe")]
SignalRInvocationContext invocationContext
)
{
throw new HubException("This error will be sent to the client!");
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.