Open
Description
Instead of handling region-checking on the interface client side, can we handle it here?
When i try region = "taiwan"
with both ecdc_ili
(Europe) and kcdc_ili
(Korea) through epidatr
, I get epidata warning: no results
and an empty tibble. But I'm pretty sure that this region is invalid. It seems like this query should error instead of returning an empty result, which implies that the query was valid
Ideally the error would say that the requested region is invalid, with more info about how to provide a valid region name.
covidcast
does error with invalid geo_values
, although the error is sub-optimal (this is with an API key set).
> covidcast::covidcast_signal("jhu-csse", "confirmed_cumulative_num", geo_type = "state", geo_values = "zz")
Error in .request("covidcast", params) :
Bad Request (HTTP 400). Failed to fetch data from API anonymously.