Azure / Azure/azure-functions-dotnet-worker
SignalR - HubException includes a stack trace
- 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.