Files
nutshell/cashu/core/errors.py
2022-10-08 13:56:01 +02:00

22 lines
366 B
Python

from pydantic import BaseModel
class CashuError(Exception, BaseModel):
code = "000"
error = "CashuError"
class MintException(CashuError):
code = 100
error = "Mint"
class LightningException(MintException):
code = 200
error = "Lightning"
class InvoiceNotPaidException(LightningException):
code = 201
error = "invoice not paid."