Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

BankConnection.owners: JSONObject["owners"] is not a JSONArray #235

Closed
ChristianSch opened this issue Sep 4, 2019 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ChristianSch
Copy link
Contributor

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]
@proshin-roman proshin-roman self-assigned this Sep 12, 2019
@proshin-roman proshin-roman added the bug Something isn't working label Sep 12, 2019
@ccostin93 ccostin93 assigned ccostin93 and unassigned proshin-roman Nov 20, 2020
ccostin93 added a commit that referenced this issue Nov 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants