drivardxrm / CountryPicker.PCF

Country Picker PCF
MIT License
5 stars 2 forks source link

Error Fetching data API Offline #11

Closed MattCollins-Jones closed 3 years ago

MattCollins-Jones commented 3 years ago

We use this PCF component in a few places and noticed an error saying "Error Fetching data".

errorCountryPicker

I took a look at the API listed and it looks like it's got a 504 bad gateway error, so i'm assuming it's offline. I'm not sure if this is prone to going offline or if it's going offline permanently, I just wanted to raise it. I appreciate you have no control over the API and it's just a public one, but thought it might be something you want to investigate or switch to another API source.

joslange commented 3 years ago

Same issue here. restcountries.eu redirects to http://countrylayer.com/ that requires registration (free account) and an api key. Love the pcf control though, makes the country selection stand out visually and standardized spelling without a separate country lookup entity.

drivardxrm commented 3 years ago

Hi @MattCollins-Jones That is a big problem indeed ;(. I guess I have no choice than to refactor the control and inject the free API key in the inputs.

Will try to work on it ASAP

drivardxrm commented 3 years ago

@MattCollins-Jones @joslange The free tier of the new API is very bad. 100 call per month 😡 image

I might have to find another source API

drivardxrm commented 3 years ago

@MattCollins-Jones I think I found the issue, while looking at the doc they changed the api version to 3.1 Ex. This call will still work like before : https://restcountries.com/v3.1/all

The control uses https://restcountries.eu/rest/v2/all that looks discontinued I will update ASAP

drivardxrm commented 3 years ago

@MattCollins-Jones @joslange I published a new release v1.0.0.8 seems that the base urll i was using for the API call is not working anymore (https://restcountries.eu) changed to https://restcountries.com and all seems back to normal.

joslange commented 3 years ago

@MattCollins-Jones @joslange I published a new release v1.0.0.8 seems that the base urll i was using for the API call is not working anymore (https://restcountries.eu) changed to https://restcountries.com and all seems back to normal.

Quickly tested an upgrade in one environment, can confirm that it seems to be working just fine. Thanks for the quick response! :)

drivardxrm commented 3 years ago

Closing the issue