Commit 598edfdb authored by Célande Adrien's avatar Célande Adrien Committed by ntome

[ing] catch recipient error

this new error may be for people not allowed to add recipients,
but the website message is not relevant:
```
L’ajout de bénéficiaire n’a pas pu être effectué.
Pour plus d’information, veuillez contacter notre Centre de Relation Client.
```

Closes: 46321@sibi
parent 41967e3d
......@@ -433,7 +433,11 @@ class IngAPIBrowser(LoginBrowser, StatesMixin):
# it is the only time that it appears
if error['code'] == 'SENSITIVE_OPERATION.SENSITIVE_OPERATION_NOT_FOUND':
raise AddRecipientTimeout()
elif error['code'] == 'EXTERNAL_ACCOUNT.EXTERNAL_ACCOUNT_ALREADY_EXISTS':
elif error['code'] in (
'EXTERNAL_ACCOUNT.EXTERNAL_ACCOUNT_ALREADY_EXISTS',
# not allowed to add a recipient
'EXTERNAL_ACCOUNT.ACCOUNT_RESTRICTION',
):
raise AddRecipientBankError(message=error['message'])
assert False, 'Recipient error not handled'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment