-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot unmarshal object into Go struct field TransactionResponse.items.subAmount of type string #27
Comments
Do you have a way to share the JSON privately? Or should I go through it and kill all personal data? |
{
"action": {
"payload": "48efbcad-f320-5979-8d64-<XXX>",
"type": "timelineDetail"
},
"amount": {
"currency": "EUR",
"fractionDigits": 2,
"value": -5.95
},
"badge": null,
"eventType": "card_successful_transaction",
"icon": "logos/merchant-d86e2356-3f2c-4e12-bb84-<XXX>/v2",
"id": "48efbcad-f320-5979-8d64-<XXX>",
"status": "EXECUTED",
"subAmount": null,
"subtitle": null,
"timestamp": "2024-05-27T13:51:55.167+0000",
"title": "<XXX>"
},
{
"action": {
"payload": "8334ce43-36e0-43cc-9a23-<XXX>",
"type": "timelineDetail"
},
"amount": {
"currency": "EUR",
"fractionDigits": 2,
"value": -5.36
},
"badge": null,
"eventType": "benefits_spare_change_execution",
"icon": "logos/<XXX>/v2",
"id": "8334ce43-36e0-43cc-9a23-<XXX>",
"status": "EXECUTED",
"subAmount": null,
"subtitle": "Round up",
"timestamp": "2024-05-23T13:59:05.402+0000",
"title": "<XXX>"
},
{
"action": {
"payload": "701e379c-a992-520a-b5c9-<XXX>",
"type": "timelineDetail"
},
"amount": {
"currency": "EUR",
"fractionDigits": 2,
"value": -157.93
},
"badge": null,
"eventType": "card_successful_transaction",
"icon": "logos/merchant-fallback-entertainment/v2",
"id": "701e379c-a992-520a-b5c9-<XXX>",
"status": "EXECUTED",
"subAmount": {
"currency": "CZK",
"fractionDigits": 2,
"value": -3900
},
"subtitle": null,
"timestamp": "2024-05-23T11:37:27.519+0000",
"title": "<XXX>"
}, I had a look myself and here are two examples of transactions with a |
Hey @tenjaa, |
Hey @tenjaa Thanks |
It starts downloading files successfully but then fails.
|
This is interesting, it is definitely something else. could you post the json for this ID please? I will meanwhile disable exiting when details cannot be fetched but rather skip the transactions for now. But your json still could help to understand and fix the problem |
I don't think I can. I enabled to write responses but there is no file called |
It should be in |
Found it
|
This is super strange. You can see in the |
@tenjaa If it would even be possible it would really help if you could find this transaction in TR mobile or web app (I know this means a lot of scrolling, and this is exactly the reason why our app exists :)) and check if you can press on it and see the details page. Thank you! |
@tenjaa please download the new revision from here and this time I hope you will have your csv and docs :) |
Doesn't work. I found it but when clicking on it it seems to load indefinately. There is no timeout but it is in that state for over a minute now already. |
It still shows an error but does not crash and continues successfully!
|
Thanks a lot for spending time and confirming my theory. Even TR app cannot not fetch the info, so maybe we could use the data from the first response only, I will create an issue for that later. |
This is exactly how I wanted it to be: error is shown to you, but the app doesn't fail. So I can release it if it finished all transactions with no errors? |
In my opinion yes. |
Great.
|
In the end my goal is to put all trades into portfolio performance. There are two ways to import data: csv and parsing the pdf directly (see here). |
I will have a look into it. Was not familiar with that app. Maybe it would make sense to consider exporting csv for it in future. Thank you for your assistance. |
for me it is the credit card transactions that are skipped as unknown transactions |
Hey @martinAtGitHub, |
Thanks for the response! It is "Unsupported". So as of now it is the intended behaviour. |
If that helps I can implement including those transactions optionally. But there are a few questions that would be good to clarify from the very beginning:
|
I would take the option that causes the least effort for you.
|
I created a dedicated issue for that. We can definitely implement it if it is helpful to at least one person. We already receive all necessary information from TR, so it is not that much of a hassle. However, I still don't know if writing those transactions into the same csv file is a good idea. I am thinking about having a separate file for that. I guess we all agree that it is not part of the portfolio but rather the "bank side" of Trade Republic. |
a separate file would be perfectly fine for me, too. |
Describe the bug
Fetching timeline transactions fails on JSON unmarshalling stage because we never expected that
subAmount
field could containing something else but string.To Reproduce
Waiting for the sample JSON
Expected behavior
It should not fail on this stage, especially because we do not even use this field anywhere within our code.
The text was updated successfully, but these errors were encountered: