DataONEorg / scythe

Scythe, the data citation harvester
Other
7 stars 2 forks source link

more input type warnings #25

Open atn38 opened 3 years ago

atn38 commented 3 years ago

Minor issue: when I accidentally gave citation_search a data.frame as input, it gave this non informative error

Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : 
  URL using bad/illegal format or missing URL

Should be fairly trivial to type check inputs and give appropriate warnings IMO

mbjones commented 3 years ago

Thanks @atn38 for the feedback, and yeah I agree. We'd welcome a pull request if you had interest in this improvement. If not, we'll try to incorporate this the next time we have cycles to tackle the package.

jeanetteclark commented 3 years ago

I went ahead and added a very simple warning in the main function which I think accomplishes this, though we could make it more robust. Commit abdbd8c