This commit is contained in:
nicolas.dorier
2020-11-23 19:39:53 +09:00
parent 8405ce6369
commit a64dd9af16

View File

@@ -276,15 +276,7 @@ namespace BTCPayServer.Controllers.GreenField
} }
catch (Exception ex) catch (Exception ex)
{ {
var nameSpace = ex.GetType().Namespace; return this.CreateAPIError("generic-error", ex.Message);
var isLnClientError = nameSpace != null &&
nameSpace.StartsWith("BTCPayServer.Lightning",
StringComparison.OrdinalIgnoreCase);
if (isLnClientError)
{
return this.CreateAPIError("invoice-error", ex.Message);
}
throw;
} }
} }