mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54: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)
|
||||
}.ToJObject();
|
||||
}
|
||||
|
||||
var i = await _invoiceController.CreateInvoiceCoreRaw(invoiceRequest, store, Request.GetAbsoluteRoot(), additionalTags);
|
||||
InvoiceEntity i;
|
||||
try
|
||||
{
|
||||
i = await _invoiceController.CreateInvoiceCoreRaw(invoiceRequest, store, Request.GetAbsoluteRoot(), additionalTags);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return this.CreateAPIError(null, e.Message);
|
||||
}
|
||||
if (i.Type != InvoiceType.TopUp)
|
||||
{
|
||||
min = i.GetPaymentMethod(pmi).Calculate().Due.ToDecimal(MoneyUnit.Satoshi);
|
||||
|
||||
Reference in New Issue
Block a user