title: Handle all exceptions in SignalR hubs in Asp.Net Core 3.1
body: <p>In Web API all the exceptions can be cought by Middleware. In Asp.Net Core 5.0 Hub Filters will do that job.</p>
  <p>But how to handle exceptions in Asp.Net Core 3.1 in SignalR hubs? Is there a sole way to write try/catch in every methods like below?</p>
  <pre><code>[Authorize]
  public class OrdersHub : BaseHub
  {
          public async Task GetOrder(Guid requestId, int orderId)
          {
              try
              {
                  var data = await ordersService.GetOrderAsync(orderId);
                  await Clients.Caller.SendAsync(&quot;GetOrderResult&quot;, requestId, result);
              }
              catch (Exception ex)
              {
                  await Clients.Caller.Reject(requestId, ex);
              }
          }
  }
  </code></pre>