-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Related to #200 - After upgrading to 5.0.0b1 to use CAMT fallback for GLS Bank, get_transactions() crashes when the bank requires TAN authentication during the CAMT request.
Describe the bug
The issue is in client.py line 541 in the CAMT fallback path:
except FinTSUnsupportedOperation:
hkcaz = self._find_highest_supported_command(HKCAZ1)
booked_streams, pending_streams = self._get_transactions_xml(...) # ← crashes hereThis tries to unpack the result as a tuple, but _get_transactions_xml() can return NeedTANResponse when TAN is required.
Bank I tested this with
- Name: GLS Gemeinschaftsbank eG
- FinTS URL: https://fints1.atruvia.de/cgi-bin/hbciservlet
Expected behavior
get_transactions() should return NeedTANResponse so the caller can handle it (same as the MT940 path does).
Error message
fints.exceptions.FinTSUnsupportedOperation: No supported HIKAZS version found. I support (5, 6, 7), bank supports ().
During handling of the above exception, another exception occurred:
TypeError: cannot unpack non-iterable NeedTANResponse object
File "fints/client.py", line 541, in get_transactions
booked_streams, pending_streams = self._get_transactions_xml(dialog, hkcaz, account, start_date, end_date)
Suggested fix
except FinTSUnsupportedOperation:
hkcaz = self._find_highest_supported_command(HKCAZ1)
result = self._get_transactions_xml(dialog, hkcaz, account, start_date, end_date)
# Fix: Check if TAN is required before unpacking
if isinstance(result, NeedTANResponse):
return result
booked_streams, pending_streams = result
# ... rest unchangedHappy to submit a PR if that helps!
jahir and stewmehr
Metadata
Metadata
Assignees
Labels
No labels