Skip to content

Exceptions

AccountHolderNotFoundException

Bases: PaymentAccountException

Exception raised when trying to use a non-existing Account Holder.

AccountHolderTerminatedException

Bases: PaymentAccountException

Exception raised when trying to use a terminated Account Holder.

AccountNotFoundException

Bases: PaymentAccountException

Exception raised when trying to use a non-existing Account.

AccountNotFoundOnProviderException

AccountNotFoundOnProviderException(external_id)

Bases: PaymentAccountException

Exception raised when the PSP does not know the account.

Distinct from AccountNotFoundException (account unknown to Alan): here Alan knows the account but its PSP id is not (or no longer) found at the provider.

Source code in components/payment_gateway/subcomponents/accounts/protected/exceptions.py
def __init__(self, external_id: str) -> None:
    super().__init__(
        f"Account with external id {external_id} not found on provider"
    )
    self.external_id = external_id

external_id instance-attribute

external_id = external_id

AccountTerminatedException

Bases: PaymentAccountException

Exception raised when trying to use a terminated Account.

InvalidAccountStatusTransitionException

Bases: PaymentAccountException, ValueError

Exception raised when attempting an invalid Account status transition.

PaymentAccountException

Bases: PaymentGatewayException

Base class for all Account exceptions.

SepaBeneficiaryNotFoundException

Bases: PaymentAccountException

Exception raised when trying to use a non-existing SEPA beneficiary.