andybega / icews

Get the ICEWS event data
https://www.andybeger.com/icews/
Other
23 stars 2 forks source link

Add error hint for expired dataverse API tokens #77

Closed andybega closed 3 years ago

andybega commented 3 years ago

Haven't run the update in a while and I get errors like this:

> get_dataset(get_doi()$historic)
Error in get_dataset(get_doi()$historic) : 
  Not Found (HTTP 404). Failed to API endpoint does not exist on this server. Please check your code for typos, or consult our API guide at http://guides.dataverse.org..

The problem was that my API token had expired and I needed to generate a new one. As far as I can tell there is no programmatic way to identify an issue with the token, but maybe just add this as an extra hint for 404 error messages.