From f60904d8e8f82aafd20f6f69dbefdac21aaec487 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 15 Jul 2019 17:52:40 +0200 Subject: [PATCH] Gracefully fail on error 9010 --- fints/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fints/client.py b/fints/client.py index 115b6fe..2cf49fa 100644 --- a/fints/client.py +++ b/fints/client.py @@ -1224,6 +1224,10 @@ class FinTS3PinTanClient(FinTS3Client): # Fall back to onestep self.set_tan_mechanism('999') + if response.code == '9010': + raise FinTSClientError("Error during dialog initialization, could not fetch BPD. Please check that you " + "passed the correct bank identifier to the HBCI URL of the correct bank.") + if (not dialog.open and response.code.startswith('9')) or response.code in ('9340', '9910', '9930', '9931', '9942'): # Assume all 9xxx errors in a not-yet-open dialog refer to the PIN or authentication # During a dialog also listen for the following codes which may explicitly indicate an -- 2.47.2