This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
This repository was archived by the owner on Jul 7, 2021. It is now read-only.
BankConnection.owners: JSONObject["owners"] is not a JSONArray #235
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
For the testBank (id 277672) the BankConnection object fails for the owners attribute because it's null instead of an empty list.
// FinApiBankConnection, FinApiOwner are my own classes
bankConnection.owners().iterator().forEachRemaining(owner -> finApiBankConnection.getOwners().add(new FinApiOwner(owner)));
the response:
2019-09-04 12:39:12.177 INFO 2194 --- [nio-2368-exec-1] org.proshin.finapi.endpoint.FpEndpoint : Response body was: {"connections":[{"id":635974,"bankId":277672,"bank":{"id":277672,"name":"FinAPI Test Bank","loginHint":null,"bic":null,"blz":"00000000","blzs":["00000000"],"loginFieldUserId":"Onlinebanking-ID","loginFieldCustomerId":null,"loginFieldPin":"PIN","isCustomerIdPassword":false,"isSupported":true,"supportedDataSources":["FINTS_SERVER"],"pinsAreVolatile":false,"location":null,"city":null,"isTestBank":true,"popularity":3,"health":100,"lastCommunicationAttempt":"2019-09-04 12:37:39.000","lastSuccessfulCommunication":"2019-09-04 12:37:39.000"},"name":null,"bankingUserId":"XXXXX","bankingCustomerId":null,"bankingPin":"XXXXX","type":"DEMO","updateStatus":"READY","categorizationStatus":"READY","lastManualUpdate":null,"lastAutoUpdate":null,"twoStepProcedures":[],"ibanOnlyMoneyTransferSupported":false,"ibanOnlyDirectDebitSupported":false,"collectiveMoneyTransferSupported":false,"defaultTwoStepProcedureId":null,"accountIds":[1019437],"owners":null,"furtherLoginNotRecommended":false}]}
the stack trace:
org.json.JSONException: JSONObject["owners"] is not a JSONArray.
at org.json.JSONObject.getJSONArray(JSONObject.java:764) ~[json-20180813.jar:na]
at org.proshin.finapi.bankconnection.FpBankConnection.owners(FpBankConnection.java:133) ~[finapi-java-client-0.1.73.jar:0.1.73]
at de.redacted.services.FinApiService.importBankConnection(FinApiService.java:208) ~[main/:na]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working