gcflames5 / ynab-splitwise-integration

A tool to copy transactions from Splitiwise to YNAB for budgeting purposes.
25 stars 6 forks source link

API exception: Bad request #5

Closed danielle-g closed 4 years ago

danielle-g commented 4 years ago

Thanks so much for creating this - will solve a common problem for me.

The first time I ran this, I received the following error: ynab.client.invoker.ApiException: Bad Request at ynab.client.invoker.ApiClient.handleResponse(ApiClient.java:926) at ynab.client.invoker.ApiClient.execute(ApiClient.java:842) at ynab.client.api.TransactionsApi.bulkCreateTransactionsWithHttpInfo(TransactionsApi.java:159) at ynab.client.api.TransactionsApi.bulkCreateTransactions(TransactionsApi.java:144) at com.github.gclfames5.ynab.YNABHandler.addTransactions(YNABHandler.java:111) at com.github.gclfames5.Main.main(Main.java:154) Writing config...

Every subsequent time I've run it since, there are no new transactions, so I haven't been able to see if error repeats itself. Running this on OSX 10.14, Java 13.0.1.

Thanks!

MaybeThisIsRu commented 4 years ago

This is because YNAB has deprecated the bulk write transactions API endpoint (see here).

Seeing as the Java library is an unofficial library for accessing the YNAB API, it still uses the deprecated API endpoint - and so does this app.

gcflames5 commented 4 years ago

I thought that this was the problem as well, but I still occasionally see requests rejected by YNAB's API. I have yet to find the commonalities in the rejected transactions, but 0acd2d4315214061d70109a1c485427a7235a336 stops using the deprecated call, so if one transaction fails the rest will still go through.