This commit is contained in:
nicolas.dorier 2020-11-23 19:39:53 +09:00
parent 8405ce6369
commit a64dd9af16
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

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