Skip to content
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

Do not exit with fatal error on unknown transactions #26

Closed
dhojayev opened this issue Jun 2, 2024 · 6 comments · Fixed by #29
Closed

Do not exit with fatal error on unknown transactions #26

dhojayev opened this issue Jun 2, 2024 · 6 comments · Fixed by #29
Assignees
Labels
enhancement New feature or request new feature New features that are worth implementing

Comments

@dhojayev
Copy link
Owner

dhojayev commented Jun 2, 2024

In order to allow people with transactions that are yet not know by the app to be able to build the CSV and download PDF documents it is necessary to not exit but rather continue when a response with unknown transaction type is received.

It would be great to not fail and continue on the list and output the summary of the IDs of transactions that are yet unknown to the app. This will allow people to share that information and use the app with the transactions that are already known and supported.

@dhojayev dhojayev self-assigned this Jun 2, 2024
@tenjaa
Copy link

tenjaa commented Jun 5, 2024

I guess this is the issue I ran into?
So if you need someone with an unsupported transaction to test somthing I would offer my account :)

Jun  5 21:27:33.866 [PANI] could not fetch transactions: could not unmarshal timelineTransactions response: json: cannot unmarshal object into Go struct field TransactionResponse.items.subAmount of type string
panic: (*logrus.Entry) 0xc0002b0a80

goroutine 1 [running]:
github.com/sirupsen/logrus.(*Entry).log(0xc0002b0150, 0x0, {0xc000338180, 0xb6})
        /go/pkg/mod/github.com/sirupsen/logrus@v1.9.3/entry.go:260 +0x491
github.com/sirupsen/logrus.(*Entry).Log(0xc0002b0150, 0x0, {0xc0000a5e60?, 0xc0001d1180?, 0xc0002a4ab0?})
        /go/pkg/mod/github.com/sirupsen/logrus@v1.9.3/entry.go:304 +0x48
github.com/sirupsen/logrus.(*Logger).Log(0xc0001d1180, 0x0, {0xc0000a5e60, 0x1, 0x1})
        /go/pkg/mod/github.com/sirupsen/logrus@v1.9.3/logger.go:204 +0x58
github.com/sirupsen/logrus.(*Logger).Panic(...)
        /go/pkg/mod/github.com/sirupsen/logrus@v1.9.3/logger.go:253
main.main()
        /github/workspace/cmd/portfoliodownloader/public/main.go:44 +0x43b

@dhojayev
Copy link
Owner Author

dhojayev commented Jun 5, 2024

Hi @tenjaa,
thanks for the log report you posted. Would be really helpful if you could post the responses both from the timeline and details.
You can enable storing responses by passing -w when running the app.
But please do not forget to falsify the IDs and document URLs for data protection.
Thanks again.

@dhojayev
Copy link
Owner Author

dhojayev commented Jun 5, 2024

@tenjaa actually just noticed that it is failing while fetching the timeline, so there are no details available yet at that stage. So please send me the JSON that is available with falsified ids and remove docs url.

@dhojayev
Copy link
Owner Author

dhojayev commented Jun 5, 2024

@tenjaa let's continue here please:
#27

@dhojayev dhojayev added enhancement New feature or request new feature New features that are worth implementing labels Jun 6, 2024
@dhojayev dhojayev linked a pull request Jun 6, 2024 that will close this issue
@dhojayev
Copy link
Owner Author

dhojayev commented Jun 6, 2024

@dmagur please download the binary from here and let me know if it works now for you:
https://github.com/dhojayev/traderepublic-portfolio-downloader/actions/runs/9408338061

@dmagur
Copy link
Collaborator

dmagur commented Jun 7, 2024

@dhojayev it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature New features that are worth implementing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants