When feeding a name not in the db into get_wormsid() (and I'm guessing others), a no match causes the entire function to crash. e.g.
> get_wormsid(searchterm = c("Agarum clathratum", "bad species name"))
Retrieving data for taxon 'Agarum clathratum'
Retrieving data for taxon 'bad species name'
Error in `[.data.frame`(worms_df, , c("AphiaID", "scientificname", "status", :
undefined columns selected
When feeding a name not in the db into
get_wormsid()
(and I'm guessing others), a no match causes the entire function to crash. e.g.Can this fail gracefully and just return an NA?