Add error for invalid network

This commit is contained in:
nicolas.dorier
2019-11-30 23:33:42 +09:00
parent d2357ee8b9
commit fa61c2bcdd
3 changed files with 13 additions and 1 deletions

View File

@@ -227,6 +227,17 @@ namespace BTCPayServer.Controllers
}
}
}
catch (FormatException ex)
{
JObject obj = new JObject();
obj.Add("error", "invalid-network");
obj.Add("details", ex.ToString());
try
{
await websocketHelper.Send(obj.ToString(), cancellationToken);
}
catch { }
}
catch (Exception ex)
{
JObject obj = new JObject();