Greenfield: Improve error message, do not use internal lightning node on store's lightning API

This commit is contained in:
nicolas.dorier
2021-12-16 12:32:13 +09:00
parent bbddd72780
commit 4f7eeea14e
12 changed files with 149 additions and 64 deletions

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
namespace BTCPayServer.Filters
{
public class JsonHttpExceptionFilter : IExceptionFilter
{
public void OnException(ExceptionContext context)
{
if (context.Exception is JsonHttpException ex)
{
context.Result = ex.ActionResult;
context.ExceptionHandled = true;
}
}
}
}