ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

More graceful errors on http problems #101

Closed steffilazerte closed 3 years ago

steffilazerte commented 4 years ago

Expected Behaviour

weather_dl() returns an informative error if there was a problem connecting to ECCC

Current Behaviour

It is not informative (see #100)

boshek commented 4 years ago

This twigged a memory for me. In tidyhydat we do this:

https://github.com/ropensci/tidyhydat/blob/8d30e1186c0c900cb184cab21b33cff55152de82/R/utils.R#L187-L202

Just leaving this here in case it is helpful.