Commit 165e4ff5 authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[caissedepargne] handle add recipient invalid otp

parent ae3ce23d
......@@ -35,7 +35,7 @@ from weboob.browser.filters.html import Link, Attr, TableCell
from weboob.capabilities import NotAvailable
from import (
Account, Investment, Recipient, TransferBankError, Transfer,
AddRecipientBankError, Loan,
AddRecipientBankError, Loan, RecipientInvalidOTP,
from weboob.capabilities.bill import DocumentTypes, Subscription, Document
from import is_isin_valid
......@@ -1265,6 +1265,13 @@ class SmsRequest(LoggedPage, JsonPage):
return self.doc['step']['validationUnits'][0][key][0]['id']
def get_saml(self):
if not 'response' in self.doc:
error = self.doc['phase']['previousResult']
raise RecipientInvalidOTP()
assert not error, 'Error during recipient validation: %s' % error
return self.doc['response']['saml2_post']['samlResponse']
def get_action(self):
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