Skip to content

Error if no results in epmc_search? #20

@cstubben

Description

@cstubben

I sometimes run epmc_search in a loop, and if no results are found, it exits with an error. Right now I'm checking error messages, but it might be better if "No results found" returns a message and empty table instead?

if (hits == 0){
  message("There are no results matching your query") 
  md <- tibble()
}else{
  ...
}
attr(md, "hit_count") <- hits
return(md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions