hide websocket exceptions

This commit is contained in:
nicolas.dorier
2018-02-15 16:17:27 +09:00
parent 3071826f06
commit 66597aed46
2 changed files with 4 additions and 1 deletions

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.0.1.30</Version>
<Version>1.0.1.31</Version>
<NoWarn>NU1701</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Http.Extensions;
using BTCPayServer.Controllers;
using System.Net.WebSockets;
namespace BTCPayServer.Hosting
{
@@ -82,6 +83,8 @@ namespace BTCPayServer.Hosting
{
await _Next(httpContext);
}
catch (WebSocketException)
{ }
catch (UnauthorizedAccessException ex)
{
await HandleBitpayHttpException(httpContext, new BitpayHttpException(401, ex.Message));