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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user