Add exchange-rates-client fallback implementation #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR tries to fix application build failure.
Currently, maven build failing due to failed
ExchangeRatesClientTest
test.The test is failing while requesting exchange rates from Fixer API.
The root cause of this failure is discontinued Fixer API (since June 1st, 2018).
More details from the response:
So, this PR adds a workaround in form of fallback implementation for
ExchangeRatesClient
, which returns emptyExchangeRatesContainer
.The motivation of this fix is the following:
Notes:
I've quickly looked at new Fixer API and would like to share with you what I've found :)
Fixer API now requires access key for any requests, which by itself not a big problem, as they are offering a free tier.
The worst part is that it's now limited up to 1000 requests per month and doesn't allow to specify the custom base currency.
As result, it seems to me, that Fixer SaaS API is not suitable anymore for this application.
Next steps:
As a further logical step to solve this issue, I would suggest to:
What do you think? :)