1
0

change to separate exception class for too low fees

store exception in variable instead of using a bool flag

add default str to routing exceptions

Add separate exception class to handle fee related payment errors
This commit is contained in:
f321x
2025-01-28 14:51:15 +01:00
committed by f321x
parent 41e32145a8
commit 5eb9aa074e
4 changed files with 22 additions and 22 deletions

View File

@@ -450,13 +450,11 @@ class InvalidGossipMsg(Exception):
class PaymentFailure(UserFacingException): pass
class NoPathFound(PaymentFailure):
def __init__(self, message: Optional[str] = None, *, maybe_fee_related: Optional[bool] = False):
self.maybe_fee_related = maybe_fee_related
self._message = message
super().__init__(message)
def __str__(self):
return self._message or _('No path found')
return _('No path found')
class FeeBudgetExceeded(PaymentFailure):
def __str__(self):
return _('Fee budget exceeded')
class LNProtocolError(Exception):