mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Catch exception when creating new invoice with GetLNURL
This commit is contained in:
@@ -418,8 +418,15 @@ namespace BTCPayServer
|
|||||||
OrderId = AppService.GetAppOrderId(app)
|
OrderId = AppService.GetAppOrderId(app)
|
||||||
}.ToJObject();
|
}.ToJObject();
|
||||||
}
|
}
|
||||||
|
InvoiceEntity i;
|
||||||
var i = await _invoiceController.CreateInvoiceCoreRaw(invoiceRequest, store, Request.GetAbsoluteRoot(), additionalTags);
|
try
|
||||||
|
{
|
||||||
|
i = await _invoiceController.CreateInvoiceCoreRaw(invoiceRequest, store, Request.GetAbsoluteRoot(), additionalTags);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return this.CreateAPIError(null, e.Message);
|
||||||
|
}
|
||||||
if (i.Type != InvoiceType.TopUp)
|
if (i.Type != InvoiceType.TopUp)
|
||||||
{
|
{
|
||||||
min = i.GetPaymentMethod(pmi).Calculate().Due.ToDecimal(MoneyUnit.Satoshi);
|
min = i.GetPaymentMethod(pmi).Calculate().Due.ToDecimal(MoneyUnit.Satoshi);
|
||||||
|
|||||||
Reference in New Issue
Block a user