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
Because this is a recurrent theme for API packages (and CRAN asks them to "fail gracefully" in these cases), I've checked what happens when I turn of the internet and I don't think it is that explicit for the user.
> npi_search(city = "San Francisco")
Requesting records 0-10...
Error in curl::curl_fetch_memory(url, handle = handle) :
Could not resolve host: npiregistry.cms.hhs.gov
Maybe there could be a way to display a better error message when internet is off or the website unreachable?
Like check first hand if internet is off and errors explicitly if it is the case.
The text was updated successfully, but these errors were encountered:
I was able to reproduce the reported issue and fix it. Here is a reprex after fixing it:
npi::npi_search(city = "San Francisco")
#> 10 records requested
#> Requesting records 0-10...
#> Error in `npi_api()` at npi/R/api.R:49:2:
#> ! Unable to access Internet. Check network connection and try again.
From ropensci/software-review#505 (comment):
The text was updated successfully, but these errors were encountered: