Skip to content

Exceptions

FinancialInstrumentNotFoundException

Bases: PaymentPartyException

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

FinancialInstrumentProviderMappingNotFoundException

Bases: PaymentPartyException

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

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

InvalidFinancialInstrumentDataException

InvalidFinancialInstrumentDataException(
    instrument_type, msg=None
)

Bases: PaymentPartyException

Exception raised when the financial instrument data is invalid.

Source code in components/payment_gateway/subcomponents/parties/protected/exceptions.py
def __init__(
    self,
    instrument_type: FinancialInstrumentType,
    msg: str | None = None,
):
    self.instrument_type = instrument_type
    super().__init__(
        f"Financial instrument data for {instrument_type} is invalid"
        + (f" : {msg}" if msg is not None else "")
    )

instrument_type instance-attribute

instrument_type = instrument_type

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.