mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
API: Fix for invoice not found (#2148)
In case the invoice ID was invalid, this resulted in an exception instead of a 404.
This commit is contained in:
parent
0cc24c8076
commit
5f46b48d45
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ namespace BTCPayServer.Controllers.GreenField
|
|||
}
|
||||
|
||||
var invoice = await _invoiceRepository.GetInvoice(invoiceId, true);
|
||||
if (invoice.StoreId != store.Id)
|
||||
if (invoice?.StoreId != store.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue