Skip to content

Exceptions

FinancialInstrumentNotFoundException

Bases: PaymentPartyException

Exception raised when trying to use a non-existing Financial Instrument.

FinancialInstrumentTerminatedException

Bases: PaymentPartyException

Exception raised when trying to use a terminated Financial Instrument.

FinancialInstrumentTypeNotSupportedException

FinancialInstrumentTypeNotSupportedException(
    instrument_type, supported_types, msg=None
)

Bases: PaymentPartyException

Exception raised when trying to use a financial instrument type that is not supported.

Source code in components/payment_gateway/subcomponents/parties/protected/exceptions.py
def __init__(
    self,
    instrument_type: FinancialInstrumentType,
    supported_types: list[FinancialInstrumentType],
    msg: str | None = None,
):
    self.instrument_type = instrument_type
    self.supported_types = supported_types
    super().__init__(
        f"Financial instrument type {instrument_type} is not supported"
        if msg is None
        else msg
    )

instrument_type instance-attribute

instrument_type = instrument_type

supported_types instance-attribute

supported_types = supported_types

LegalEntityNotFoundException

Bases: PaymentPartyException

Exception raised when trying to use a non-existing Legal Entity.

LegalEntityTerminatedException

Bases: PaymentPartyException

Exception raised when trying to use a terminated Legal Entity.

PaymentPartyException

Bases: PaymentGatewayException

Base class for all Party exceptions.