Add LightningPaymentFailedError exception (#706)

* add error code

* fix test
This commit is contained in:
callebtc
2025-03-06 00:04:37 +01:00
committed by GitHub
parent f72a3f260f
commit 9305905a85
3 changed files with 19 additions and 10 deletions

View File

@@ -153,6 +153,14 @@ class QuoteNotPaidError(CashuError):
super().__init__(self.detail, code=self.code)
class LightningPaymentFailedError(CashuError):
detail = "Lightning payment failed"
code = 20004
def __init__(self, detail: Optional[str] = None):
super().__init__(detail or self.detail, code=self.code)
class QuoteSignatureInvalidError(CashuError):
detail = "Signature for mint request invalid"
code = 20008