Closed PJUllrich closed 2 months ago
Oh, that’s not good! Thanks for the issue. I will do my best to resolve in the next 24 hours.
I think the error lies in either ex_cldr
, ex_cldr_currencies
, or ex_cldr_numbers
because it occurred after I upgraded to their latest versions. Once I downgraded back to these versions, it started working again:
Package | Broken Version | Working Version |
---|---|---|
ex_cldr | 2.40.0 | 2.39.2 |
ex_cldr_currencies | 2.16.2 | 2.16.1 |
ex_cldr_numbers | 2.33.2 | 2.33.1 |
Thank you and I hope it helps! ❤️
It seems that the ExchangeRatesRetriever
uses Cldr for fetching the rates. This might be where the error occurs: https://github.com/kipcole9/money/blob/main/lib/money/exchange_rates/exchange_rates_retriever.ex#L200
@PJUllrich, the bug was related to the Cldr.Json.decode!/1
JSON shim that is part of cldr_utils. This module is only used when running on OTP 27+ since it wraps the new :json
module.
The shim was only written to support binary arguments, whereas the exchange rate data is a chartist. I've now fixed that.
The resolution is to mix deps.update cldr_utils ex_cldr_numbers
and you should be good to go. Please let me know if that resolves the issue for you?
@kipcole9 yes, that worked :) thank you!
Hey @kipcole9, I started getting exceptions from the
Money.ExchangeRates.Retriever
module yesterday. I think it can't parse the response from OpenExchangeRates anymore. Here's the error log: