mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 18:43:42 +02:00
Merge pull request #5768 from priyanshiiit/lookupInvoice
lnd: adds NOT_FOUND status code for LookupInvoice
This commit is contained in:
@ -5101,7 +5101,10 @@ func (r *rpcServer) LookupInvoice(ctx context.Context,
|
||||
rpcsLog.Tracef("[lookupinvoice] searching for invoice %x", payHash[:])
|
||||
|
||||
invoice, err := r.server.invoices.LookupInvoice(payHash)
|
||||
if err != nil {
|
||||
switch {
|
||||
case err == channeldb.ErrInvoiceNotFound:
|
||||
return nil, status.Error(codes.NotFound, err.Error())
|
||||
case err != nil:
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user