Details
Description
When using the built-in fields definition "Country", the countries are pulled from the external URL http://download.geonames.org/export/dump/countryInfo.txt.
If the environment is a disconnected environment where this URL can't be reached from system-app the dropdown field Country is not populated.
Reaching the endpoint via the system-app pod returns the following error:
oc rsh -c system-provider dc/system-app sh-4.2$ curl -v http://download.geonames.org/export/dump/countryInfo.txt * Could not resolve host: download.geonames.org; Unknown error * Closing connection 0 curl: (6) Could not resolve host: download.geonames.org; Unknown error sh-4.2$
And also we have:
irb(main):001:0> Country.all => #<ActiveRecord::Relation []> irb(main):002:0>
The code has a fallback: when the request returns an HTTP error or a timeout an internal URL is used (https://ADMIN-PORTAL-URL/countries.json) to fetch a json file with the countries. However this fallback doesn't include the "Could not resolve host" error.
The request is to include the "Could not resolve host" error so Customers that doesn't allow to make external requests from their 3scale environment can use the countries.json file.