From: Jan Holthuis Date: Mon, 5 Jan 2026 11:09:11 +0000 (+0100) Subject: fix: Handle `NeedTanResponse` on CAMT request (#207) X-Git-Tag: v5.0.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=446ba968d79dc33fb07db07d74b1e31a37f5a16c;p=thirdparty%2Fpython-fints.git fix: Handle `NeedTanResponse` on CAMT request (#207) --- diff --git a/fints/client.py b/fints/client.py index bde901f..1e73582 100644 --- a/fints/client.py +++ b/fints/client.py @@ -538,7 +538,13 @@ class FinTS3Client: return self._get_transactions_mt940(dialog, hkkaz, account, start_date, end_date, include_pending) except FinTSUnsupportedOperation: hkcaz = self._find_highest_supported_command(HKCAZ1) - booked_streams, pending_streams = self._get_transactions_xml(dialog, hkcaz, account, start_date, end_date) + response = self._get_transactions_xml(dialog, hkcaz, account, start_date, end_date) + + # If a TAN is required, exit early + if isinstance(response, NeedTANResponse): + return response + + booked_streams, pending_streams = response transactions = [] for s in booked_streams: transactions += [Transaction(t) for t in camt053_to_dict(s)]