Skip to content

Unhelpful error when name_lookup does not return anything #399

@barthoekstra

Description

@barthoekstra

I'm trying to lookup the vernacular names of birds using name_lookup(), but the error I get once a vernacular name cannot be found in GBIF (if I understand it right) is very unhelpful.

E.g.

name_lookup("Zwartbuikrotgans", datasetKey = "4dd32523-a3a3-43b7-84df-4cda02f15cf7", higherTaxonKey = 162310263)

Results in:

Error: Can't find columns `key`, `scientificName` in `.data`.
Run `rlang::last_error()` to see where the error occurred.

Unless I totally misunderstand what this function is supposed to do, I would at least expect this to return e.g. an empty tibble or an error that is more informative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions