You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If ckanr is not set up with valid credentials, it is all too easy to get stuck, typically when libcurl complains about an empty protocol not being supported. The error chain goes like
env vars CKAN_DEFAULT_URL and friends are empty (silent)
ckanr::get_default_xxx() returns these empty values (silent)
crul calls curl with empty url and/or credentials (silent)
curl calls libcurl (silent)
libcurl receives empty url, parses it into parts, falls over empty protocol (should be http or https), and finally raises error message "not supported"
I contributed to the ckanr settings in 2015 and have been using ckanr in production since then, but I still get bitten by missing settings and would end up less often in the Corner of ShameTM if ckanr settings / ckanr setup could warn loudly and clearly so I'd remember to run ckanr_setup() with valid settings.
Prepend each web request with a pat down for missing credentials, cf. ref, code, example. I assume that anywhere outside tests each function wants to call a real CKAN instance.
The ckanr getters could issue a friendly warning message if the respective value comes back empty. I can't think of any use case where empty defaults would be desired.
If ckanr is not set up with valid credentials, it is all too easy to get stuck, typically when libcurl complains about an empty protocol not being supported. The error chain goes like
I contributed to the ckanr settings in 2015 and have been using ckanr in production since then, but I still get bitten by missing settings and would end up less often in the Corner of ShameTM if ckanr settings / ckanr setup could warn loudly and clearly so I'd remember to run ckanr_setup() with valid settings.
A setup that yells clear error messages is e.g. here https://dbca-wa.github.io/ruODK/reference/ru_settings.html which initially was stolen from ckanr settings but improved by rOpenSci reviewer comments.
Rough idea:
@sharlagelfand @sckott what do you reckon?
The text was updated successfully, but these errors were encountered: