mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-23 19:54:18 +01:00
Add LightningPaymentFailedError exception (#706)
* add error code * fix test
This commit is contained in:
@@ -36,6 +36,7 @@ from ..core.errors import (
|
||||
KeysetError,
|
||||
KeysetNotFoundError,
|
||||
LightningError,
|
||||
LightningPaymentFailedError,
|
||||
NotAllowedError,
|
||||
QuoteNotPaidError,
|
||||
QuoteSignatureInvalidError,
|
||||
@@ -1057,7 +1058,7 @@ class Ledger(LedgerVerification, LedgerSpendingConditions, LedgerTasks, LedgerFe
|
||||
logger.error(
|
||||
f"Status check error: {status.error_message}"
|
||||
)
|
||||
raise LightningError(
|
||||
raise LightningPaymentFailedError(
|
||||
f"Lightning payment failed{': ' + payment.error_message if payment.error_message else ''}."
|
||||
)
|
||||
case _:
|
||||
|
||||
Reference in New Issue
Block a user